-Update
-README
+Dependency:
+=================
+python2.7 python-pip requests
+
+ sudo apt-get install python-pip
+ sudo pip install requests
+
+How to build:
+=================
+ Build from source code:
+ sudo python setup.py build
+
+How to install:
+=================
+ Install testkit lite from source code:
+ sudo python setup.py install
+
+How to use:
+=================
+ At first, install a test package or prepare one tests.xml file aligned with schema files: /opt/testkit/lite/xsd/testdefinition-syntax.xsd.
+
+ And then,
+ 1) You can run case on target:
+ For web test cases:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>'
+ For native test cases:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"
+
+ 2) You can run case in single mode :
+ For web test cases:
+ testkit-lite -f "<somewhere>/<package_name>/tests.xml" -e 'WRTLauncher <package_name>' --comm localhost
+ For native test cases:
+ testkit-lite -f "<somewhere>/<package_name>/tests.xml" --comm localhost
+
+ 3) You can select on parser engine to simply conduct one or more tests.xml on target:
+ testkit-lite -f device:"<somewhere>/<package_name1>/tests.xml ... <somewhere>/<package_namen>/tests.xml" -e 'WRTLauncher <package_name1> ... <package_namen>'
+
+ 4) If you want to execute both auto and manual tests:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml"
+
+ 5) If you just want to execute manual tests:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -M
+
+ 6) If you just want to execute auto tests:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -A
+
+ 7) If you want to save test result to another file, by default it'll be under /opt/testkit/lite/latest:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" -o <somewhere>/xxx.xml
+
+ 8) If you want to choose some filters:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --status level1 --type type1 ...
+
+ 9) If you want to run test according capability:
+ testkit-lite -f device:"<somewhere>/<package_name>/tests.xml" --capability capability.xml
+
+ 10) At last, you can freely compose the above parameters together:
+ testkit-lite -f <somewhere1>/tests.xml <somewhere2>/tests.xml -A --priority P1 --type type1 ...
+
+Get Results:
+=================
+
+ Test report will be generated as tests.result.xml
+ The result will be under /opt/testkit/lite/latest after execution, you can also check the history results in /opt/testkit/lite/yyyy-mm-dd-HH:MM:SS.NNNNNN.
+
+View Results:
+=================
+
+Test report can be viewed in HTML format, so the data in the xml result file looks more human friendly.
+
+Please follow the following steps to view test report:
+ 1) copy files: application.js back_top.png jquery.min.js testresult.xsl tests.css under directory /opt/testkit/lite/xsd/
+ 2) put the files from step 1) under the same directory as the xml result file
+ 3) open xml result file with a web browser(IE, Chrome or Firefox)
+
+Known Issues:
+=================
+
#!/usr/bin/python
#
# Copyright (C) 2013 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# Authors:
# Liu,chengtao <liux.chengtao@intel.com>
+"""Test connector for test instance and target instance"""
+
+from .log import LOGGER
-import sys
-import time
class Connector:
- """Communication module for automatic test"""
+
+ """Communication module for test host and test remote"""
def __init__(self, config):
self.__handler = None
if "testremote" in config:
try:
- exec "from impl.%s import testremote" % config["testremote"]
- self.__handler = testremote
- except Exception, e:
- print e
+ exec "from impl.%s import get_target_conn" % config[
+ "testremote"]
+ self.__handler = get_target_conn()
+ except Exception, error:
+ LOGGER.error("[Error: Failed to initilize connector,"
+ " exception: % s]\n" % error)
def get_connector(self):
"""list the handler instance"""
return self.__handler
-
-def main(argvs):
- """commanline entry for invoke Connector apis"""
- if len(argvs) < 2:
- print "No command-line parameters provided."
- return
-
- ret = None
- subcmd = argvs[1]
- conn = Connector({"testremote":"tizenMobile"}).get_connector()
- if conn is None:
- print "Testremote instance is not initialized successfully!"
- return
- if subcmd == "get_device_ids":
- ret = conn.get_device_ids()
- elif subcmd == "get_device_info":
- ret = conn.get_device_info("emulator-26100")
- elif subcmd == "install_package":
- ret = conn.install_package("emulator-26100", \
- "/home/packages/tct-webapi-tizen-contact-tests-1.1.9-7.1.i586.rpm")
- elif subcmd == "get_installed_package":
- ret = conn.get_installed_package("emulator-26100")
- elif subcmd == "remove_package":
- ret = conn.remove_package("emulator-26100", \
- "tct-webapi-tizen-contact-tests-1.1.9-7.1.i586")
- elif subcmd == "download_file":
- ret = conn.download_file("emulator-26100", \
- "/usr/share/tct-webapi-tizen-time-tests/tests.xml",\
- "/usr/share/tct-webapi-tizen-time-tests/tests.xml")
- elif subcmd == "upload_file":
- ret = conn.upload_file("emulator-26100", \
- "/usr/share/tct-webapi-tizen-time-tests/tests.xml",\
- "/usr/share/tct-webapi-tizen-time-tests/tests.xml")
- else:
- print "unknown sub command name \"%s\"" % subcmd
-
- print "result:", ret
-
-if __name__ == '__main__':
- main(sys.argv)
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# Authors:
# Zhang, Huihui <huihuix.zhang@intel.com>
# Wendong,Sui <weidongx.sun@intel.com>
+""" The shell command executor module"""
import os
import sys
import time
-import threading
import subprocess
-from multiprocessing import Process
-from multiprocessing import Value
-from killall import killall
-from str2 import *
-def shell_exec(cmd, timeout=None, boutput=False):
+from .killall import killall
+from .str2 import str2str
+
+
+def shell_command(cmd):
+ """shell communication for quick return in sync mode"""
+ proc = subprocess.Popen(cmd,
+ shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ ret1 = proc.stdout.readlines()
+ ret2 = proc.stderr.readlines()
+ result = ret1 or ret2
+ return result
+
+
+def shell_command_ext(cmd="",
+ timeout=None,
+ boutput=False,
+ stdout_file=None,
+ stderr_file=None):
"""shell executor, return [exitcode, stdout/stderr]
timeout: None means unlimited timeout
boutput: specify whether print output during the command running
"""
- BUFFILE1 = os.path.expanduser("~") + os.sep + ".shellexec_buffile_stdout"
- BUFFILE2 = os.path.expanduser("~") + os.sep + ".shellexec_buffile_stderr"
-
- LOOP_DELTA = 0.01
-
+ buffer_1 = ""
+ buffer_2 = ""
+ if stdout_file is None:
+ buffer_1 = os.path.expanduser(
+ "~") + os.sep + "shellexec_stdout"
+ else:
+ buffer_1 = stdout_file
+
+ if stderr_file is None:
+ buffer_2 = os.path.expanduser(
+ "~") + os.sep + "shellexec_stderr"
+ else:
+ buffer_2 = stderr_file
+
+ loop_delta = 0.1
exit_code = None
stdout_log = ""
stderr_log = ""
-
- wbuffile1 = file(BUFFILE1, "w")
- wbuffile2 = file(BUFFILE2, "w")
- rbuffile1 = file(BUFFILE1, "r")
- rbuffile2 = file(BUFFILE2, "r")
-
- # start execution process
- cmdPopen = subprocess.Popen(args=cmd, shell=True,
- stdout=wbuffile1, stderr=wbuffile2)
+ time_val = timeout
+
+ wbuffile1 = file(buffer_1, "w")
+ wbuffile2 = file(buffer_2, "w")
+ rbuffile1 = file(buffer_1, "r")
+ rbuffile2 = file(buffer_2, "r")
+ cmd_open = subprocess.Popen(args=cmd,
+ shell=True,
+ stdout=wbuffile1,
+ stderr=wbuffile2)
+ rbuffile1.seek(0)
+ rbuffile2.seek(0)
+
def print_log():
+ """print the stdout to terminate"""
sys.stdout.write(rbuffile1.read())
sys.stdout.write(rbuffile2.read())
sys.stdout.flush()
-
- # loop for timeout and print
- rbuffile1.seek(0)
- rbuffile2.seek(0)
- t = timeout
+
while True:
- exit_code = cmdPopen.poll()
+ exit_code = cmd_open.poll()
if exit_code is not None:
break
-
+
if boutput:
print_log()
-
- if t is not None:
- if t <= 0:
- # timeout, kill command
+
+ if time_val is not None:
+ if time_val <= 0:
try:
exit_code = "timeout"
- cmdPopen.terminate()
+ cmd_open.terminate()
time.sleep(5)
- except:
- killall(cmdPopen.pid)
+ except OSError:
+ killall(cmd_open.pid)
break
else:
- t -= LOOP_DELTA
-
- time.sleep(LOOP_DELTA)
- # print left output
+ time_val -= loop_delta
+ time.sleep(loop_delta)
+
if boutput:
- # flush left output in log
print_log()
- # store the log from buffile
- rbuffile1.seek(0)
- rbuffile2.seek(0)
- stdout_log = rbuffile1.read()
- stderr_log = rbuffile2.read()
- # only leave readable characters
- stdout_log = str2str(stdout_log)
- stderr_log = str2str(stderr_log)
- retruncode = 0
- if 'returncode=' in stdout_log:
- index = stdout_log.find('returncode=')+11
- retruncode = str(int(stdout_log[index:]))
- exit_code = retruncode
- stdout_log = '<![CDATA[' + stdout_log + ']]>'
- stderr_log = '<![CDATA[' + stderr_log + ']]>'
- # close file
+
+ if not boutput:
+ rbuffile1.seek(0)
+ rbuffile2.seek(0)
+ stdout_log = rbuffile1.read()
+ stderr_log = rbuffile2.read()
+ stdout_log = str2str(stdout_log)
+ stderr_log = str2str(stderr_log)
+ if 'returncode=' in stdout_log:
+ index = stdout_log.find('returncode=') + 11
+ retruncode = str(stdout_log[index:])
+ exit_code = retruncode.strip('\r\n')
+ stdout_log = '<![CDATA[' + stdout_log + ']]>'
+ stderr_log = '<![CDATA[' + stderr_log + ']]>'
+
wbuffile1.close()
wbuffile2.close()
rbuffile1.close()
rbuffile2.close()
- os.remove(BUFFILE1)
- os.remove(BUFFILE2)
-
- return [exit_code, stdout_log.strip('\n'), stderr_log.strip('\n')]
+ os.remove(buffer_1)
+ os.remove(buffer_2)
+ if not boutput:
+ return [exit_code, stdout_log.strip('\n'), stderr_log.strip('\n')]
+ else:
+ return True
--- /dev/null
+#!/usr/bin/python
+#
+# Copyright (C) 2012 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# Authors:
+# Liu ChengTao <liux.chengtao@intel.com>
+""" The http request process module"""
+
+import requests
+import json
+
+
+def get_url(baseurl, api):
+ """get full url string"""
+ return "%s%s" % (baseurl, api)
+
+
+def http_request(url, rtype="POST", data=None):
+ """
+ http request to the device http server
+ """
+ result = None
+ if rtype == "POST":
+ headers = {'content-type': 'application/json'}
+ try:
+ ret = requests.post(url, data=json.dumps(data), headers=headers)
+ if ret:
+ result = ret.json()
+ except Exception, error:
+ pass
+ elif rtype == "GET":
+ try:
+ ret = requests.get(url, params=data)
+ if ret:
+ result = ret.json()
+ except Exception, error:
+ pass
+ return result
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110 - 1301, USA.
#
# Authors:
# Zhang, Huihui <huihuix.zhang@intel.com>
# Wendong,Sui <weidongx.sun@intel.com>
+""" The process kill for os"""
import os
import platform
import re
import ctypes
+
def killall(ppid):
"""Kill all children process by parent process ID"""
- OS = platform.system()
+ os_ver = platform.system()
try:
- if OS == "Linux":
+ if os_ver == "Linux":
ppid = str(ppid)
pidgrp = []
-
+
def getchildpids(ppid):
"""Return a list of children process"""
- command = "ps -ef | awk '{if ($3 == %s) print $2;}'" % str(ppid)
+ command = "ps -ef | awk '{if ($3 == %s) print $2;}'" % str(
+ ppid)
pids = os.popen(command).read()
pids = pids.split()
return pids
-
+
pidgrp.extend(getchildpids(ppid))
for pid in pidgrp:
pidgrp.extend(getchildpids(pid))
- #Insert self process ID to PID group list
+ # Insert self process ID to PID group list
pidgrp.insert(0, ppid)
while len(pidgrp) > 0:
pid = pidgrp.pop()
try:
os.kill(int(pid), signal.SIGKILL)
- except Exception, e:
+ except OSError, error:
pattern = re.compile('No such process')
- match = pattern.search(str(e))
+ match = pattern.search(str(error))
if not match:
- print "[ Error: fail to kill pid: %s, error: %s ]\n" % (int(pid), e)
+ print "[ Error: fail to kill pid: %s," \
+ " error: %s ]\n" % (int(pid), error)
# kill for windows platform
else:
kernel32 = ctypes.windll.kernel32
handle = kernel32.OpenProcess(1, 0, int(ppid))
- kill_result = kernel32.TerminateProcess(handle, 0)
- except Exception, e:
+ kernel32.TerminateProcess(handle, 0)
+ except OSError, error:
pattern = re.compile('No such process')
- match = pattern.search(str(e))
+ match = pattern.search(str(error))
if not match:
- print "[ Error: fail to kill pid: %s, error: %s ]\n" % (int(ppid), e)
+ print "[ Error: fail to kill pid: %s, error: %s ]\n" \
+ % (int(ppid), error)
return None
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# Authors:
# Liu ChengTao <liux.chengtao@intel.com>
+""" The implementation for local mode"""
import os
-import sys
import time
-import socket
import threading
-import subprocess
-import requests
-import json
import re
import uuid
+import ConfigParser
+from datetime import datetime
+from commodule.log import LOGGER
+from .httprequest import get_url, http_request
+from .autoexec import shell_command, shell_command_ext
+
+
+DATE_FORMAT_STR = "%Y-%m-%d %H:%M:%S"
+HOST_NS = "127.0.0.1"
+os.environ["no_proxy"] = HOST_NS
-def get_url(baseurl, api):
- """get full url string"""
- return "%s%s" % (baseurl, api)
-def http_request(url, rtype="POST", data=None):
- """http request to the device http server"""
- result = None
- if rtype == "POST":
- headers = {'content-type': 'application/json'}
- try:
- ret = requests.post(url, data=json.dumps(data), headers=headers)
- if ret:
- result = ret.json()
- except Exception, e:
- pass
- elif rtype == "GET":
- try:
- ret = requests.get(url, params=data)
- if ret:
- result = ret.json()
- except Exception, e:
- pass
-
- return result
-
-def shell_command(cmdline):
- """sdb communication for quick return in sync mode"""
- proc = subprocess.Popen(cmdline,
- shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- ret1 = proc.stdout.readlines()
- ret2 = proc.stderr.readlines()
- result = ret1 or ret2
- return result
-
-lockobj = threading.Lock()
-test_server_result = []
-test_server_status = {}
class StubExecThread(threading.Thread):
- """sdb communication for serve_forever app in async mode"""
+
+ """ stub instance serve_forever in async mode"""
def __init__(self, cmd=None, sessionid=None):
super(StubExecThread, self).__init__()
- self.stdout = []
- self.stderr = []
self.cmdline = cmd
self.sessionid = sessionid
- def run(self):
- BUFFILE1 = os.path.expanduser("~") + os.sep + self.sessionid + "_stdout"
- BUFFILE2 = os.path.expanduser("~") + os.sep + self.sessionid + "_stderr"
-
- LOOP_DELTA = 0.2
- wbuffile1 = file(BUFFILE1, "w")
- wbuffile2 = file(BUFFILE2, "w")
- rbuffile1 = file(BUFFILE1, "r")
- rbuffile2 = file(BUFFILE2, "r")
- proc = subprocess.Popen(self.cmdline,
- shell=True,
- stdout=wbuffile1,
- stderr=wbuffile2)
- def print_log():
- """
- print the stdout/stderr log
- """
- sys.stdout.write(rbuffile1.read())
- sys.stdout.write(rbuffile2.read())
- sys.stdout.flush()
-
- rbuffile1.seek(0)
- rbuffile2.seek(0)
- while True:
- if not proc.poll() is None:
- break
- print_log()
- time.sleep(LOOP_DELTA)
- # print left output
- print_log()
- wbuffile1.close()
- wbuffile2.close()
- rbuffile1.close()
- rbuffile2.close()
- os.remove(BUFFILE1)
- os.remove(BUFFILE2)
+ def run(self):
+ stdout_file = os.path.expanduser(
+ "~") + os.sep + self.sessionid + "_stdout"
+ stderr_file = os.path.expanduser(
+ "~") + os.sep + self.sessionid + "_stderr"
+ shell_command_ext(cmd=self.cmdline,
+ timeout=None,
+ boutput=True,
+ stdout_file=stdout_file,
+ stderr_file=stderr_file)
+
+
+LOCK_OBJ = threading.Lock()
+TEST_SERVER_RESULT = []
+TEST_SERVER_STATUS = {}
+
+
+def _get_test_options(test_launcher, test_suite):
+ """get test option dict """
+ test_opt = {}
+ if test_launcher.find('WRTLauncher') != -1:
+ test_opt["launcher"] = "wrt-launcher"
+ cmd = "wrt-launcher -l | grep %s | awk '{print $NF}'" % test_suite
+ ret = shell_command(cmd)
+ if len(ret) == 0:
+ LOGGER.info("[ test suite \"%s\" not found in target ]"
+ % test_suite)
+ return None
+ else:
+ test_opt["suite_id"] = ret[0].strip('\r\n')
+ else:
+ test_opt["launcher"] = test_launcher
+
+ test_opt["suite_name"] = test_suite
+ return test_opt
+
+
+def _set_result(result_data):
+ """set cases result to the global result buffer"""
+ global TEST_SERVER_RESULT
+ if not result_data is None:
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT["cases"].extend(result_data)
+ LOCK_OBJ.release()
+
class CoreTestExecThread(threading.Thread):
+
"""sdb communication for serve_forever app in async mode"""
def __init__(self, device_id, test_set_name, exetype, test_cases):
super(CoreTestExecThread, self).__init__()
self.cases_queue = test_cases
self.device_id = device_id
self.exetype = exetype
- global test_server_result
- lockobj.acquire()
- test_server_result = {"cases":[]}
- lockobj.release()
-
- def set_result(self, result_data):
- """set case result to the result buffer"""
- if not result_data is None:
- global test_server_result
- lockobj.acquire()
- test_server_result["cases"].append(result_data)
- lockobj.release()
def run(self):
"""run core tests"""
- from autoexec import shell_exec
- global test_server_status
if self.cases_queue is None:
return
total_count = len(self.cases_queue)
current_idx = 0
- for tc in self.cases_queue:
+ manual_skip_all = False
+ result_list = []
+
+ global TEST_SERVER_STATUS, TEST_SERVER_RESULT
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"cases": []}
+ TEST_SERVER_STATUS = {"finished": 0}
+ LOCK_OBJ.release()
+ for test_case in self.cases_queue:
current_idx += 1
- lockobj.acquire()
- test_server_status = {"finished": 0}
- lockobj.release()
expected_result = "0"
core_cmd = ""
time_out = None
measures = []
retmeasures = []
- if "entry" in tc:
- core_cmd = tc["entry"]
+ if "entry" in test_case:
+ core_cmd = test_case["entry"]
else:
- print "[ Warnning: test script is empty, please check your test xml file ]"
+ LOGGER.info(
+ "[ Warnning: test script is empty,"
+ " please check your test xml file ]")
continue
- if "expected_result" in tc:
- expected_result = tc["expected_result"]
- if "timeout" in tc:
- time_out = int(tc["timeout"])
- if "measures" in tc:
- measures = tc["measures"]
-
- print "\n[case] execute case:\nTestCase: %s\nTestEntry: %s\nExpected Result: %s\nTotal: %s, Current: %s" % (tc['case_id'], tc['entry'], expected_result, total_count, current_idx)
- print "[ execute test script, this might take some time, please wait ]"
+ if "expected_result" in test_case:
+ expected_result = test_case["expected_result"]
+ if "timeout" in test_case:
+ time_out = int(test_case["timeout"])
+ if "measures" in test_case:
+ measures = test_case["measures"]
+
+ LOGGER.info("\n[case] execute case:\nTestCase: %s\nTestEntry: %s\n"
+ "Expected Result: %s\nTotal: %s, Current: %s" % (
+ test_case['case_id'], test_case['entry'],
+ expected_result, total_count, current_idx))
+ LOGGER.info("[ execute test script,"
+ "this might take some time, please wait ]")
+ strtime = datetime.now().strftime(DATE_FORMAT_STR)
+ LOGGER.info("start time: %s" % strtime)
+ test_case["start_at"] = strtime
if self.exetype == 'auto':
- return_code, stdout, stderr = shell_exec(
- core_cmd, time_out, False)
+ return_code, stdout, stderr = shell_command_ext(
+ cmd=core_cmd, timeout=time_out, boutput=False)
if return_code is not None:
actual_result = str(return_code)
if actual_result == "timeout":
- tc["result"] = "BLOCK"
- tc["stdout"] = "none"
- tc["stderr"] = "none"
+ test_case["result"] = "BLOCK"
+ test_case["stdout"] = "none"
+ test_case["stderr"] = "none"
else:
if actual_result == expected_result:
- tc["result"] = "pass"
+ test_case["result"] = "pass"
else:
- tc["result"] = "fail"
- tc["stdout"] = stdout
- tc["stderr"] = stderr
+ test_case["result"] = "fail"
+ test_case["stdout"] = stdout
+ test_case["stderr"] = stderr
- for m in measures:
- ind = m['name']
- fname = m['file']
+ for item in measures:
+ ind = item['name']
+ fname = item['file']
if fname and os.path.exists(fname):
try:
config = ConfigParser.ConfigParser()
config.read(fname)
- m['value'] = config.get(ind, 'value')
- retmeasures.append(m)
- except Exception, e:
- print "[ Error: fail to parse performance value, error: %s ]\n" % e
- tc["measures"] = retmeasures
+ item['value'] = config.get(ind, 'value')
+ retmeasures.append(item)
+ except IOError, error:
+ LOGGER.error(
+ "[ Error: failed to parse value,"
+ " error: %s ]\n" % error)
+ test_case["measures"] = retmeasures
else:
- tc["result"] = "BLOCK"
- tc["stdout"] = "none"
- tc["stderr"] = "none"
+ test_case["result"] = "BLOCK"
+ test_case["stdout"] = "none"
+ test_case["stderr"] = "none"
elif self.exetype == 'manual':
# handle manual core cases
try:
- # print pre-condition info
- if "pre_condition" in tc:
- print "\n****\nPre-condition: %s\n ****\n" % tc['pre_condition']
- # print step info
- if "steps" in tc:
- for step in tc['steps']:
- print "********************\nStep Order: %s" % step['order']
- print "Step Desc: %s" % step['step_desc']
- print "Expected: %s\n********************\n" % step['expected']
- while True:
- test_result = raw_input(
- '[ please input case result ] (p^PASS, f^FAIL, b^BLOCK, n^Next, d^Done):')
- if test_result.lower() == 'p':
- tc["result"] = "PASS"
- break
- elif test_result.lower() == 'f':
- tc["result"] = "FAIL"
- break
- elif test_result.lower() == 'b':
- tc["result"] = "BLOCK"
- break
- elif test_result.lower() == 'n':
- tc["result"] = "N/A"
- break
- elif test_result.lower() == 'd':
- tc["result"] = "N/A"
- break
- else:
- print "[ Warnning: you input: '%s' is invalid, \
- please try again ]" % test_result
- except Exception, error:
- print "[ Error: fail to get core manual test step, \
- error: %s ]\n" % error
- print "Case Result: %s" % tc["result"]
- self.set_result(tc)
-
- lockobj.acquire()
- test_server_status = {"finished": 1}
- lockobj.release()
+ # LOGGER.infopre-condition info
+ if "pre_condition" in test_case:
+ LOGGER.info("\n****\nPre-condition: %s\n ****\n"
+ % test_case[
+ 'pre_condition'])
+ # LOGGER.infostep info
+ if "steps" in test_case:
+ for step in test_case['steps']:
+ LOGGER.info(
+ "********************\nStep Order: %s"
+ % step['order'])
+ LOGGER.info("Step Desc: %s" % step['step_desc'])
+ LOGGER.info(
+ "Expected: %s\n********************\n"
+ % step['expected'])
+ if manual_skip_all:
+ test_case["result"] = "N/A"
+ else:
+ while True:
+ test_result = raw_input(
+ '[ please input case result ] '
+ '(p^PASS, f^FAIL, b^BLOCK, n^Next, d^Done):')
+ if test_result.lower() == 'p':
+ test_case["result"] = "PASS"
+ break
+ elif test_result.lower() == 'f':
+ test_case["result"] = "FAIL"
+ break
+ elif test_result.lower() == 'b':
+ test_case["result"] = "BLOCK"
+ break
+ elif test_result.lower() == 'n':
+ test_case["result"] = "N/A"
+ break
+ elif test_result.lower() == 'd':
+ manual_skip_all = True
+ test_case["result"] = "N/A"
+ break
+ else:
+ LOGGER.info(
+ "[ Warning: you input: '%s' is invalid,"
+ " please try again ]" % test_result)
+ except IOError, error:
+ LOGGER.error(
+ "[ Error: fail to get core manual test step,"
+ " error: %s ]\n" % error)
+ strtime = datetime.now().strftime(DATE_FORMAT_STR)
+ LOGGER.info("end time: %s" % strtime)
+ test_case["end_at"] = strtime
+ LOGGER.info("Case Result: %s" % test_case["result"])
+ result_list.append(test_case)
+
+ _set_result(result_list)
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = {"finished": 1}
+ LOCK_OBJ.release()
+
class WebTestExecThread(threading.Thread):
+
"""sdb communication for serve_forever app in async mode"""
def __init__(self, server_url, test_set_name, test_data_queue):
super(WebTestExecThread, self).__init__()
self.server_url = server_url
self.test_set_name = test_set_name
self.data_queue = test_data_queue
- global test_server_result
- lockobj.acquire()
- test_server_result = {"cases":[]}
- lockobj.release()
-
- def set_result(self, result_data):
- """set http result response to the result buffer"""
- if not result_data is None:
- global test_server_result
- lockobj.acquire()
- test_server_result["cases"].extend(result_data["cases"])
- lockobj.release()
def run(self):
"""run web tests"""
if self.data_queue is None:
return
- global test_server_status
set_finished = False
- cur_block = 0
err_cnt = 0
- total_block = len(self.data_queue)
+ global TEST_SERVER_STATUS, TEST_SERVER_RESULT
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"cases": []}
+ LOCK_OBJ.release()
for test_block in self.data_queue:
- cur_block += 1
- ret = http_request(get_url(self.server_url, "/init_test"), "POST", test_block)
+ ret = http_request(get_url(
+ self.server_url, "/set_testcase"), "POST", test_block)
if ret is None or "error_code" in ret:
break
while True:
- ret = http_request(get_url(self.server_url, "/check_server_status"), \
- "GET", {})
+ ret = http_request(
+ get_url(self.server_url, "/check_server_status"),
+ "GET", {})
if ret is None or "error_code" in ret:
err_cnt += 1
- if err_cnt >= 10:
- lockobj.acquire()
- test_server_status = {"finished": 1}
- lockobj.release()
+ if err_cnt >= 3:
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = {"finished": 1}
+ LOCK_OBJ.release()
break
elif "finished" in ret:
- lockobj.acquire()
- test_server_status = ret
- lockobj.release()
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = ret
+ LOCK_OBJ.release()
err_cnt = 0
- print "[ test suite: %s, block: %d/%d , finished: %s ]" % \
- (self.test_set_name, cur_block, total_block, ret["finished"])
- ### check if current test set is finished
+ # check if current test set is finished
if ret["finished"] == 1:
set_finished = True
- ret = http_request(get_url(self.server_url, "/get_test_result"), \
- "GET", {})
- self.set_result(ret)
+ ret = http_request(
+ get_url(self.server_url, "/get_test_result"),
+ "GET", {})
+ _set_result(ret["cases"])
break
- ### check if current block is finished
+ # check if current block is finished
elif ret["block_finished"] == 1:
- ret = http_request(get_url(self.server_url, "/get_test_result"), \
- "GET", {})
- self.set_result(ret)
+ ret = http_request(
+ get_url(self.server_url, "/get_test_result"),
+ "GET", {})
+ _set_result(ret["cases"])
break
time.sleep(2)
if set_finished:
break
+
class HostCon:
- """ Implementation for transfer data between Host and Tizen Mobile Device"""
+
+ """ Implementation for transfer data to Test Target in Local Host"""
def __init__(self):
- self.__server_url = "http://127.0.0.1:8000"
+ self.__test_set_block = 100
+ self.__device_id = None
+ self.__server_url = None
self.__test_async_shell = None
self.__test_async_http = None
self.__test_async_core = None
- self.__test_set_block = 100
- self.__device_id = None
self.__test_type = None
def get_device_ids(self):
device_info["os_version"] = os_version_str
return device_info
- def __init_test_stub(self, deviceid, params):
+ def __init_webtest_opt(self, params):
"""init the test runtime, mainly process the star up of test stub"""
result = None
if params is None:
return result
- stub_name = ""
- stub_server_port = "8000"
- testsuite_name = ""
- testsuite_id = ""
- external_command = ""
- stub_name = params["stub-name"]
- capability_opt = None
+
+ session_id = str(uuid.uuid1())
debug_opt = ""
+ test_opt = None
+ capability_opt = None
+ stub_app = params["stub-name"]
+ stub_port = "8000"
+ test_launcher = params["external-test"]
+ testsuite_name = params["testsuite-name"]
+
+ if "debug" in params and params["debug"]:
+ debug_opt = "--debug"
if "capability" in params:
capability_opt = params["capability"]
- if "stub-port" in params:
- stub_server_port = params["stub-port"]
-
- if "debug" in params:
- bvalue = params["debug"]
- if bvalue:
- debug_opt = "--debug"
-
- if not "testsuite-name" in params:
- print "\"testsuite-name\" is required for web tests!"
- return result
- else:
- testsuite_name = params["testsuite-name"]
-
- if not "external-test" in params:
- print "\"external-test\" is required for web tests!"
- return result
- else:
- external_command = params["external-test"]
- if external_command.find("WRTLauncher") != -1:
- external_command = "wrt-launcher"
-
- cmd = "wrt-launcher -l | grep %s | awk '{print $NF}'" % testsuite_name
- ret = shell_command(cmd)
- if len(ret) == 0:
- print "[ test suite \"%s\" not found in device! ]" % testsuite_name
+ test_opt = _get_test_options(test_launcher, testsuite_name)
+ if test_opt is None:
return result
- else:
- testsuite_id = ret[0].strip('\r\n')
-
- ###kill the stub process###
- cmd = " killall %s " % stub_name
- ret = shell_command(cmd)
- print "[ waiting for kill http server ]"
- time.sleep(3)
- ###launch an new stub process###
- session_id = str(uuid.uuid1())
- print "[ launch the stub app ]"
- cmdline = "%s --testsuite:%s --external-test:\"%s\" %s" % \
- (stub_name, testsuite_id, external_command, debug_opt)
- self.__test_async_shell = StubExecThread(cmd=cmdline, sessionid=session_id)
- self.__test_async_shell.start()
+ LOGGER.info("[ launch the stub httpserver ]")
+ cmdline = " killall %s " % stub_app
+ ret = shell_command(cmdline)
time.sleep(2)
+ cmdline = "%s --port:%s %s" % (stub_app, stub_port, debug_opt)
+ self.__test_async_shell = StubExecThread(
+ cmd=cmdline, sessionid=session_id)
+ self.__test_async_shell.start()
+ self.__server_url = "http://%s:%s" % (HOST_NS, stub_port)
- ###check if http server is ready for data transfer###
timecnt = 0
+ blaunched = False
while timecnt < 10:
- ret = http_request(get_url(self.__server_url, "/check_server_status"), "GET", {})
+ time.sleep(1)
+ ret = http_request(get_url(self.__server_url,
+ "/check_server_status"), "GET", {})
if ret is None:
- print "[ check server status, not ready yet! ]"
- time.sleep(1)
+ LOGGER.info("[ check server status, not ready yet! ]")
timecnt += 1
else:
if "error_code" in ret:
- print "[ check server status, get error code %d ! ]" % ret["error_code"]
- result = None
+ LOGGER.info("[ check server status, "
+ "get error code %d ! ]" % ret["error_code"])
+ return result
else:
- result = session_id
- print "[ check server status, get ready! ]"
- if capability_opt is not None:
- ret = http_request(get_url(self.__server_url, "/set_capability"), "POST", capability_opt)
+ LOGGER.info("[ check server status, get ready! ]")
+ blaunched = True
break
- return result
- def init_test(self, deviceid, params):
+ if blaunched:
+ ret = http_request(get_url(self.__server_url,
+ "/init_test"),
+ "POST", test_opt)
+ if "error_code" in ret:
+ return None
+
+ if capability_opt is not None:
+ ret = http_request(get_url(self.__server_url,
+ "/set_capability"),
+ "POST", capability_opt)
+ return session_id
+ else:
+ LOGGER.info("[ connect to server timeout! ]")
+ return result
+
+ def init_test(self, deviceid, params):
"""init the test envrionment"""
self.__device_id = deviceid
if "client-command" in params and params['client-command'] is not None:
self.__test_type = "webapi"
- return self.__init_test_stub(deviceid, params)
+ return self.__init_webtest_opt(params)
else:
self.__test_type = "coreapi"
return str(uuid.uuid1())
- def __run_core_test(self, test_set_name, exetype, ctype, cases):
+ def __run_core_test(self, test_set_name, exetype, cases):
"""
process the execution for core api test
"""
- self.__test_async_core = CoreTestExecThread(self.__device_id, test_set_name, exetype, cases)
+ self.__test_async_core = CoreTestExecThread(
+ self.__device_id, test_set_name, exetype, cases)
self.__test_async_core.start()
return True
def __run_web_test(self, test_set_name, exetype, ctype, cases):
"""
process the execution for web api test
- may be splitted to serveral blocks, with the unit size defined by block_size
+ with the unit size defined by block_size
"""
case_count = len(cases)
blknum = 0
block_data["cases"] = cases[start:end]
test_set_blocks.append(block_data)
idx += 1
- self.__test_async_http = WebTestExecThread(self.__server_url, test_set_name, test_set_blocks)
+ self.__test_async_http = WebTestExecThread(
+ self.__server_url, test_set_name, test_set_blocks)
self.__test_async_http.start()
return True
if self.__test_type == "webapi":
return self.__run_web_test(test_set_name, exetype, ctype, cases)
else:
- return self.__run_core_test(test_set_name, exetype, ctype, cases)
+ return self.__run_core_test(test_set_name, exetype, cases)
def get_test_status(self, sessionid):
"""poll the test task status"""
- if sessionid is None:
+ if sessionid is None:
return None
result = {}
result["msg"] = []
- global test_server_status
- lockobj.acquire()
- if "finished" in test_server_status:
- result["finished"] = str(test_server_status["finished"])
+ global TEST_SERVER_STATUS
+ LOCK_OBJ.acquire()
+ if "finished" in TEST_SERVER_STATUS:
+ result["finished"] = str(TEST_SERVER_STATUS["finished"])
else:
result["finished"] = "0"
- test_server_status = {"finished": 0}
- lockobj.release()
+ TEST_SERVER_STATUS = {"finished": 0}
+ LOCK_OBJ.release()
return result
if sessionid is None:
return result
try:
- global test_server_result
- lockobj.acquire()
- result = test_server_result
- lockobj.release()
- except Exception, e:
- print e
+ global TEST_SERVER_RESULT
+ LOCK_OBJ.acquire()
+ result = TEST_SERVER_RESULT
+ LOCK_OBJ.release()
+ except OSError, error:
+ LOGGER.error(
+ "[ Error: failed to get test result, error: %s ]\n" % error)
return result
def finalize_test(self, sessionid):
"""clear the test stub and related resources"""
- if sessionid is None:
+ if sessionid is None:
return False
if self.__test_type == "webapi":
- ret = http_request(get_url(self.__server_url, "/shut_down_server"), "GET", {})
- return True
+ ret = http_request(get_url(
+ self.__server_url, "/shut_down_server"), "GET", {})
+ if ret:
+ return True
+ return False
+
-testremote = HostCon()
+def get_target_conn():
+ """ Get connection for Test Target"""
+ return HostCon()
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# Authors:
# Zhang, Huihui <huihuix.zhang@intel.com>
# Wendong,Sui <weidongx.sun@intel.com>
+""" string convertor"""
from types import *
import sys
STRENCODE = "utf8"
+
def str2str(s):
# unify str and unicode to str
if isinstance(s, unicode):
return s
return ""
+
def str2val(s):
ret = None
try:
pass
return ret
+
def str2bool(s):
if "TRUE" == str2str(s).upper():
return True
return False
return None
+
def str2number(s):
val = str2val(str2str(s))
if type(val) in [IntType, FloatType, LongType]:
#!/usr/bin/python
#
# Copyright (C) 2012 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
#
# Authors:
# Liu ChengTao <liux.chengtao@intel.com>
+""" The implementation for HD (host device) test mode"""
import os
-import sys
import time
import socket
import threading
-import subprocess
-import requests
-import json
import re
import uuid
import ConfigParser
-def get_url(baseurl, api):
- """get full url string"""
- return "%s%s" % (baseurl, api)
+from datetime import datetime
+from commodule.log import LOGGER
+from .httprequest import get_url, http_request
+from .autoexec import shell_command, shell_command_ext
-def http_request(url, rtype="POST", data=None):
- """http request to the device http server"""
- result = None
- if rtype == "POST":
- headers = {'content-type': 'application/json'}
- try:
- ret = requests.post(url, data=json.dumps(data), headers=headers)
- if ret:
- result = ret.json()
- except Exception, e:
- pass
- elif rtype == "GET":
- try:
- ret = requests.get(url, params=data)
- if ret:
- result = ret.json()
- except Exception, e:
- pass
-
- return result
-
-def shell_command(cmdline):
- """sdb communication for quick return in sync mode"""
- proc = subprocess.Popen(cmdline,
- shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- ret1 = proc.stdout.readlines()
- ret2 = proc.stderr.readlines()
- result = ret1 or ret2
- return result
-
-def get_forward_connect(device_id, remote_port=None):
- """forward request a host port to a device-side port"""
+HOST_NS = "127.0.0.1"
+DATE_FORMAT_STR = "%Y-%m-%d %H:%M:%S"
+
+
+def _get_forward_connect(device_id, remote_port=None):
+ """forward request a host tcp port to targe tcp port"""
if remote_port is None:
return None
- HOST = "127.0.0.1"
+ os.environ['no_proxy'] = HOST_NS
+ host = HOST_NS
inner_port = 9000
- TIME_OUT = 2
+ time_out = 2
bflag = False
while True:
- sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sk.settimeout(TIME_OUT)
+ sock_inner = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ sock_inner.settimeout(time_out)
try:
- sk.bind((HOST, inner_port))
- sk.close()
+ sock_inner.bind((host, inner_port))
+ sock_inner.close()
bflag = False
- except socket.error, e:
- if e.errno == 98 or e.errno == 13:
+ except socket.error, error:
+ if error.errno == 98 or error.errno == 13:
bflag = True
- if bflag: inner_port += 1
- else: break
+ if bflag:
+ inner_port += 1
+ else:
+ break
host_port = str(inner_port)
- cmd = "sdb -s %s forward tcp:%s tcp:%s" % \
- (device_id, host_port, remote_port)
- result = shell_command(cmd)
- url_forward = "http://%s:%s" % (HOST, host_port)
+ cmd = "sdb -s %s forward tcp:%s tcp:%s" % (
+ device_id, host_port, remote_port)
+ shell_command(cmd)
+ url_forward = "http://%s:%s" % (host, host_port)
return url_forward
def _download_file(deviceid, remote_path, local_path):
"""download file from device"""
cmd = "sdb -s %s pull %s %s" % (deviceid, remote_path, local_path)
- ret = shell_command(cmd)
+ ret = shell_command(cmd)
if not ret is None:
- for l in ret:
- if l.find("does not exist") != -1 or l.find("error:") != -1:
- print "[ file \"%s\" not found in device! ]" % remote_path
+ for line in ret:
+ if line.find("does not exist") != -1 or line.find("error:") != -1:
+ LOGGER.info(
+ "[ file \"%s\" not found in device! ]" % remote_path)
return False
return True
else:
return False
+
def _upload_file(deviceid, remote_path, local_path):
"""upload file to device"""
cmd = "sdb -s %s push %s %s" % (deviceid, local_path, remote_path)
- ret = shell_command(cmd)
+ ret = shell_command(cmd)
return ret
-lockobj = threading.Lock()
-test_server_result = []
-test_server_status = {}
+
class StubExecThread(threading.Thread):
- """sdb communication for serve_forever app in async mode"""
+
+ """stub instance serve_forever in async mode"""
def __init__(self, cmd=None, sessionid=None):
super(StubExecThread, self).__init__()
- self.stdout = []
- self.stderr = []
self.cmdline = cmd
self.sessionid = sessionid
- def run(self):
- BUFFILE1 = os.path.expanduser("~") + os.sep + self.sessionid + "_stdout"
- BUFFILE2 = os.path.expanduser("~") + os.sep + self.sessionid + "_stderr"
-
- LOOP_DELTA = 0.2
- wbuffile1 = file(BUFFILE1, "w")
- wbuffile2 = file(BUFFILE2, "w")
- rbuffile1 = file(BUFFILE1, "r")
- rbuffile2 = file(BUFFILE2, "r")
- proc = subprocess.Popen(self.cmdline,
- shell=True,
- stdout=wbuffile1,
- stderr=wbuffile2)
- def print_log():
- """
- print the stdout/stderr log
- """
- sys.stdout.write(rbuffile1.read())
- sys.stdout.write(rbuffile2.read())
- sys.stdout.flush()
-
- rbuffile1.seek(0)
- rbuffile2.seek(0)
- while True:
- if not proc.poll() is None:
- break
- print_log()
- time.sleep(LOOP_DELTA)
- # print left output
- print_log()
- wbuffile1.close()
- wbuffile2.close()
- rbuffile1.close()
- rbuffile2.close()
- os.remove(BUFFILE1)
- os.remove(BUFFILE2)
+ def run(self):
+ stdout_file = os.path.expanduser(
+ "~") + os.sep + self.sessionid + "_stdout"
+ stderr_file = os.path.expanduser(
+ "~") + os.sep + self.sessionid + "_stderr"
+ shell_command_ext(cmd=self.cmdline,
+ timeout=None,
+ boutput=True,
+ stdout_file=stdout_file,
+ stderr_file=stderr_file)
+
+
+LOCK_OBJ = threading.Lock()
+TEST_SERVER_RESULT = []
+TEST_SERVER_STATUS = {}
+
+
+def _set_result(result_data):
+ """set cases result to the global result buffer"""
+ global TEST_SERVER_RESULT
+ if not result_data is None:
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT["cases"].extend(result_data)
+ LOCK_OBJ.release()
+
class CoreTestExecThread(threading.Thread):
- """sdb communication for serve_forever app in async mode"""
+
+ """ stub instance serve_forever in async mode"""
def __init__(self, device_id, test_set_name, exetype, test_cases):
super(CoreTestExecThread, self).__init__()
self.test_set_name = test_set_name
self.cases_queue = test_cases
self.device_id = device_id
self.exetype = exetype
- global test_server_result
- lockobj.acquire()
- test_server_result = {"cases":[]}
- lockobj.release()
-
- def set_result(self, result_data):
- """set case result to the result buffer"""
- if not result_data is None:
- global test_server_result
- lockobj.acquire()
- test_server_result["cases"].append(result_data)
- lockobj.release()
def run(self):
"""run core tests"""
- from autoexec import shell_exec
- global test_server_status
if self.cases_queue is None:
return
total_count = len(self.cases_queue)
current_idx = 0
- for tc in self.cases_queue:
+ manual_skip_all = False
+ global TEST_SERVER_STATUS, TEST_SERVER_RESULT
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"cases": []}
+ TEST_SERVER_STATUS = {"finished": 0}
+ result_list = []
+
+ LOCK_OBJ.release()
+ for test_case in self.cases_queue:
current_idx += 1
- lockobj.acquire()
- test_server_status = {"finished": 0}
- lockobj.release()
expected_result = "0"
core_cmd = ""
time_out = None
measures = []
retmeasures = []
- if "entry" in tc:
+ if "entry" in test_case:
core_cmd = "sdb -s %s shell '%s ; echo returncode=$?'" % (
- self.device_id, tc["entry"])
+ self.device_id, test_case["entry"])
else:
- print "[ Warnning: test script is empty, please check your test xml file ]"
+ LOGGER.info(
+ "[ Warnning: test script is empty,"
+ " please check your test xml file ]")
continue
- if "expected_result" in tc:
- expected_result = tc["expected_result"]
- if "timeout" in tc:
- time_out = int(tc["timeout"])
- if "measures" in tc:
- measures = tc["measures"]
- print "\n[case] execute case:\nTestCase: %s\nTestEntry: %s\nExpected Result: %s\nTotal: %s, Current: %s" % (tc['case_id'], tc['entry'], expected_result, total_count, current_idx)
- print "[ execute test script, this might take some time, please wait ]"
+ if "expected_result" in test_case:
+ expected_result = test_case["expected_result"]
+ if "timeout" in test_case:
+ time_out = int(test_case["timeout"])
+ if "measures" in test_case:
+ measures = test_case["measures"]
+ LOGGER.info("\n[case] execute case:\nTestCase: %s\nTestEntry: %s\n"
+ "Expected Result: %s\nTotal: %s, Current: %s" % (
+ test_case['case_id'], test_case['entry'],
+ expected_result, total_count, current_idx))
+ LOGGER.info("[ execute test script,"
+ "this might take some time, please wait ]")
+
+ strtime = datetime.now().strftime(DATE_FORMAT_STR)
+ LOGGER.info("start time: %s" % strtime)
+ test_case["start_at"] = strtime
if self.exetype == 'auto':
- return_code, stdout, stderr = shell_exec(
+ return_code, stdout, stderr = shell_command_ext(
core_cmd, time_out, False)
if return_code is not None:
actual_result = str(return_code)
if actual_result == "timeout":
- tc["result"] = "BLOCK"
- tc["stdout"] = "none"
- tc["stderr"] = "none"
+ test_case["result"] = "BLOCK"
+ test_case["stdout"] = "none"
+ test_case["stderr"] = "none"
else:
if actual_result == expected_result:
- tc["result"] = "pass"
+ test_case["result"] = "pass"
else:
- tc["result"] = "fail"
- tc["stdout"] = stdout
- tc["stderr"] = stderr
-
- for m in measures:
- ind = m['name']
- fname = m['file']
- if fname is None:
+ test_case["result"] = "fail"
+ test_case["stdout"] = stdout
+ test_case["stderr"] = stderr
+
+ for item in measures:
+ ind = item['name']
+ fname = item['file']
+ if fname is None:
continue
- tmpname = os.path.expanduser("~") + os.sep + "measure_tmp"
+ tmpname = os.path.expanduser(
+ "~") + os.sep + "measure_tmp"
if _download_file(self.device_id, fname, tmpname):
try:
config = ConfigParser.ConfigParser()
config.read(tmpname)
- m['value'] = config.get(ind, 'value')
- retmeasures.append(m)
+ item['value'] = config.get(ind, 'value')
+ retmeasures.append(item)
os.remove(tmpname)
- except Exception, e:
- print "[ Error: fail to parse performance value, error: %s ]\n" % e
- tc["measures"] = retmeasures
+ except IOError, error:
+ LOGGER.error(
+ "[ Error: fail to parse value,"
+ " error:%s ]\n" % error)
+ test_case["measures"] = retmeasures
else:
- tc["result"] = "BLOCK"
- tc["stdout"] = "none"
- tc["stderr"] = "none"
+ test_case["result"] = "BLOCK"
+ test_case["stdout"] = "none"
+ test_case["stderr"] = "none"
elif self.exetype == 'manual':
# handle manual core cases
try:
- # print pre-condition info
- if "pre_condition" in tc:
- print "\n****\nPre-condition: %s\n ****\n" % tc['pre_condition']
- # print step info
- if "steps" in tc:
- for step in tc['steps']:
- print "********************\nStep Order: %s" % step['order']
- print "Step Desc: %s" % step['step_desc']
- print "Expected: %s\n********************\n" % step['expected']
- while True:
- test_result = raw_input(
- '[ please input case result ] (p^PASS, f^FAIL, b^BLOCK, n^Next, d^Done):')
- if test_result.lower() == 'p':
- tc["result"] = "PASS"
- break
- elif test_result.lower() == 'f':
- tc["result"] = "FAIL"
- break
- elif test_result.lower() == 'b':
- tc["result"] = "BLOCK"
- break
- elif test_result.lower() == 'n':
- tc["result"] = "N/A"
- break
- elif test_result.lower() == 'd':
- tc["result"] = "N/A"
- break
- else:
- print "[ Warnning: you input: '%s' is invalid, \
- please try again ]" % test_result
- except Exception, error:
- print "[ Error: fail to get core manual test step, \
- error: %s ]\n" % error
- print "Case Result: %s" % tc["result"]
- self.set_result(tc)
-
- lockobj.acquire()
- test_server_status = {"finished": 1}
- lockobj.release()
+ # LOGGER.infopre-condition info
+ if "pre_condition" in test_case:
+ LOGGER.info("\n****\nPre-condition: %s\n ****\n"
+ % test_case['pre_condition'])
+ # LOGGER.infostep info
+ if "steps" in test_case:
+ for step in test_case['steps']:
+ LOGGER.info(
+ "********************\n"
+ "Step Order: %s" % step['order'])
+ LOGGER.info("Step Desc: %s" % step['step_desc'])
+ LOGGER.info(
+ "Expected: %s\n********************\n"
+ % step['expected'])
+ if manual_skip_all:
+ test_case["result"] = "N/A"
+ else:
+ while True:
+ test_result = raw_input(
+ '[ please input case result ]'
+ ' (p^PASS, f^FAIL, b^BLOCK, n^Next, d^Done):')
+ if test_result.lower() == 'p':
+ test_case["result"] = "PASS"
+ break
+ elif test_result.lower() == 'f':
+ test_case["result"] = "FAIL"
+ break
+ elif test_result.lower() == 'b':
+ test_case["result"] = "BLOCK"
+ break
+ elif test_result.lower() == 'n':
+ test_case["result"] = "N/A"
+ break
+ elif test_result.lower() == 'd':
+ manual_skip_all = True
+ test_case["result"] = "N/A"
+ break
+ else:
+ LOGGER.info(
+ "[ Warnning: you input: '%s' is invalid,"
+ " please try again ]" % test_result)
+ except IOError, error:
+ LOGGER.info(
+ "[ Error: fail to get core manual test step,"
+ " error: %s ]\n" % error)
+ strtime = datetime.now().strftime(DATE_FORMAT_STR)
+ LOGGER.info("end time: %s" % strtime)
+ test_case["end_at"] = strtime
+ LOGGER.info("Case Result: %s" % test_case["result"])
+ result_list.append(test_case)
+
+ _set_result(result_list)
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = {"finished": 1}
+ LOCK_OBJ.release()
+
class WebTestExecThread(threading.Thread):
+
"""sdb communication for serve_forever app in async mode"""
def __init__(self, server_url, test_set_name, test_data_queue):
super(WebTestExecThread, self).__init__()
self.server_url = server_url
self.test_set_name = test_set_name
self.data_queue = test_data_queue
- global test_server_result
- lockobj.acquire()
- test_server_result = {"cases":[]}
- lockobj.release()
-
- def set_result(self, result_data):
- """set http result response to the result buffer"""
- if not result_data is None:
- global test_server_result
- lockobj.acquire()
- test_server_result["cases"].extend(result_data["cases"])
- lockobj.release()
def run(self):
"""run web tests"""
if self.data_queue is None:
return
- global test_server_status
+
set_finished = False
- cur_block = 0
err_cnt = 0
- total_block = len(self.data_queue)
+ global TEST_SERVER_RESULT, TEST_SERVER_STATUS
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"cases": []}
+ LOCK_OBJ.release()
for test_block in self.data_queue:
- cur_block += 1
- ret = http_request(get_url(self.server_url, "/init_test"), "POST", test_block)
+ ret = http_request(get_url(
+ self.server_url, "/set_testcase"), "POST", test_block)
if ret is None or "error_code" in ret:
break
-
while True:
- ret = http_request(get_url(self.server_url, "/check_server_status"), \
- "GET", {})
+ ret = http_request(
+ get_url(self.server_url, "/check_server_status"),
+ "GET", {})
if ret is None or "error_code" in ret:
err_cnt += 1
- if err_cnt >= 10:
- lockobj.acquire()
- test_server_status = {"finished": 1}
- lockobj.release()
+ if err_cnt >= 3:
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = {"finished": 1}
+ LOCK_OBJ.release()
break
elif "finished" in ret:
- lockobj.acquire()
- test_server_status = ret
- lockobj.release()
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = ret
+ LOCK_OBJ.release()
err_cnt = 0
- print "[ test suite: %s, block: %d/%d , finished: %s ]" % \
- (self.test_set_name, cur_block, total_block, ret["finished"])
- ### check if current test set is finished
+ # check if current test set is finished
if ret["finished"] == 1:
set_finished = True
- ret = http_request(get_url(self.server_url, "/get_test_result"), \
- "GET", {})
- self.set_result(ret)
+ ret = http_request(
+ get_url(self.server_url, "/get_test_result"),
+ "GET", {})
+ _set_result(ret["cases"])
break
- ### check if current block is finished
+ # check if current block is finished
elif ret["block_finished"] == 1:
- ret = http_request(get_url(self.server_url, "/get_test_result"), \
- "GET", {})
- self.set_result(ret)
+ ret = http_request(
+ get_url(self.server_url, "/get_test_result"),
+ "GET", {})
+ _set_result(ret["cases"])
break
time.sleep(2)
if set_finished:
break
+UIFW_RESULT = "/opt/media/Documents/tcresult.xml"
+
+
+class QUTestExecThread(threading.Thread):
+
+ """sdb communication for serve_forever app in async mode"""
+ def __init__(self, deviceid="", sessionid=""):
+ super(QUTestExecThread, self).__init__()
+ self.device_id = deviceid
+ self.test_session = sessionid
+
+ def run(self):
+ """run Qunit tests"""
+ global TEST_SERVER_RESULT, TEST_SERVER_STATUS
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"resultfile": ""}
+ TEST_SERVER_STATUS = {"finished": 0}
+ LOCK_OBJ.release()
+ ls_cmd = "sdb -s %s shell ls -l %s" % (self.device_id, UIFW_RESULT)
+ time_stamp = ""
+ prev_stamp = ""
+ LOGGER.info('[ uifw test suite start ...]')
+ time_out = 600
+ query_cnt = 0
+ while time_out > 0:
+ time.sleep(2)
+ time_out -= 2
+ ret = shell_command(ls_cmd)
+ if len(ret) > 0:
+ time_stamp = ret[0]
+ else:
+ time_stamp = ""
+
+ if time_stamp == prev_stamp:
+ query_cnt = query_cnt + 1
+ else:
+ prev_stamp = time_stamp
+ query_cnt = 0
+
+ if query_cnt >= 60:
+ result_file = os.path.expanduser(
+ "~") + os.sep + self.test_session + "_uifw.xml"
+ b_ok = _download_file(self.device_id,
+ UIFW_RESULT,
+ result_file)
+ if b_ok:
+ LOCK_OBJ.acquire()
+ TEST_SERVER_RESULT = {"resultfile": result_file}
+ LOCK_OBJ.release()
+ break
+ LOGGER.info('[ uifw test suite completed ... ]')
+ LOCK_OBJ.acquire()
+ TEST_SERVER_STATUS = {"finished": 1}
+ LOCK_OBJ.release()
+
+WRT_INSTALL_STR = "sdb -s %s shell wrt-installer -i /opt/%s/%s.wgt"
+WRT_QUERY_STR = "sdb -s %s shell wrt-launcher -l | grep %s | awk '{print $NF}'"
+WRT_START_STR = "sdb -s %s shell wrt-launcher -s %s"
+WRT_KILL_STR = "sdb -s %s shell wrt-launcher -k %s"
+
+
class TizenMobile:
- """ Implementation for transfer data between Host and Tizen Mobile Device"""
+
+ """ Implementation for transfer data
+ between Host and Tizen Mobile Device
+ """
def __init__(self):
- self.__forward_server_url = "http://127.0.0.1:9000"
+ self.__stub_server_url = None
self.__test_async_shell = None
self.__test_async_http = None
self.__test_async_core = None
self.__test_set_block = 100
self.__device_id = None
self.__test_type = None
+ self.__test_auto_iu = False
+ self.__test_self_exec = False
+ self.__test_self_repeat = False
+ self.__test_wgt = None
def get_device_ids(self):
"""get tizen deivce list of ids"""
result = []
ret = shell_command("sdb devices")
for line in ret:
- if str.find(line, "\tdevice\t") != -1:
+ if str.find(line, "\tdevice\t") != -1:
result.append(line.split("\t")[0])
return result
return device_info
def install_package(self, deviceid, pkgpath):
- """install a package on tizen device: push package and install with shell command"""
+ """install a package on tizen device:
+ push package and install with shell command
+ """
filename = os.path.split(pkgpath)[1]
devpath = "/tmp/%s" % filename
cmd = "sdb -s %s push %s %s" % (deviceid, pkgpath, devpath)
- ret = shell_command(cmd)
+ ret = shell_command(cmd)
cmd = "sdb shell rpm -ivh %s" % devpath
- ret = shell_command(cmd)
+ ret = shell_command(cmd)
return ret
def get_installed_package(self, deviceid):
"""get list of installed package from device"""
cmd = "sdb -s %s shell rpm -qa | grep tct" % (deviceid)
- ret = shell_command(cmd)
+ ret = shell_command(cmd)
return ret
def download_file(self, deviceid, remote_path, local_path):
"""upload file to device"""
return _upload_file(deviceid, remote_path, local_path)
- def __init_test_stub(self, deviceid, params):
+ def __get_test_options(self, deviceid, test_launcher, test_suite):
+ """get test option dict """
+ test_opt = {}
+ test_opt["suite_name"] = test_suite
+ cmd = ""
+ if test_launcher.find('WRTLauncher') != -1:
+ test_opt["launcher"] = "wrt-launcher"
+ # test suite need to be installed by commodule
+ if self.__test_auto_iu:
+ test_wgt = self.__test_wgt
+ cmd = WRT_INSTALL_STR % (deviceid, test_suite, test_wgt)
+ ret = shell_command(cmd)
+ else:
+ test_wgt = test_suite
+
+ # query the whether test widget is installed ok
+ cmd = WRT_QUERY_STR % (deviceid, test_wgt)
+ ret = shell_command(cmd)
+ if len(ret) == 0:
+ LOGGER.info("[ test widget \"%s\" not installed in target ]"
+ % test_wgt)
+ return None
+ else:
+ test_opt["suite_id"] = ret[0].strip('\r\n')
+ self.__test_wgt = test_opt["suite_id"]
+ else:
+ test_opt["launcher"] = test_launcher
+
+ return test_opt
+
+ def __init_webtest_opt(self, deviceid, params):
"""init the test runtime, mainly process the star up of test stub"""
- result = None
if params is None:
- return result
- stub_name = ""
- stub_server_port = "8000"
- testsuite_name = ""
- testsuite_id = ""
- external_command = ""
- stub_name = params["stub-name"]
- capability_opt = None
+ return None
+
+ session_id = str(uuid.uuid1())
+ cmdline = ""
debug_opt = ""
+ test_opt = None
+ capability_opt = None
+ stub_app = params["stub-name"]
+ stub_port = "8000"
+ test_launcher = params["external-test"]
+ testsuite_name = params["testsuite-name"]
+ client_cmds = params['client-command'].strip(' ').split(' ')
+ wrt_tag = ""
+ if len(client_cmds) >= 2:
+ wrt_tag = client_cmds[1]
+
+ if "debug" in params and params["debug"]:
+ debug_opt = "--debug"
if "capability" in params:
capability_opt = params["capability"]
- if "stub-port" in params:
- stub_server_port = params["stub-port"]
-
- if "debug" in params:
- bvalue = params["debug"]
- if bvalue:
- debug_opt = "--debug"
-
- if not "testsuite-name" in params:
- print "\"testsuite-name\" is required for web tests!"
- return result
+ if wrt_tag.find('-iu') != -1:
+ self.__test_auto_iu = True
+ self.__test_wgt = params["testset-name"]
else:
- testsuite_name = params["testsuite-name"]
+ self.__test_auto_iu = False
- if not "external-test" in params:
- print "\"external-test\" is required for web tests!"
- return result
+ # this suite is automated by itself
+ if wrt_tag.find('-a') != -1:
+ self.__test_self_exec = True
+ testsuite_name = 'tct-webuifw-tests'
else:
- external_command = params["external-test"]
- if external_command.find("WRTLauncher") != -1:
- external_command = "wrt-launcher"
+ self.__test_self_exec = False
- cmd = "sdb -s %s shell wrt-launcher -l | grep %s | awk '{print $NF}'" % \
- (deviceid, testsuite_name)
- ret = shell_command(cmd)
- if len(ret) == 0:
- print "[ test suite \"%s\" not found in device! ]" % testsuite_name
- return result
+ # this suite is repeat just skip it
+ if wrt_tag.find('-r') != -1:
+ self.__test_self_repeat = True
+ return session_id
else:
- testsuite_id = ret[0].strip('\r\n')
-
- ###kill the stub process###
- cmd = "sdb shell killall %s " % stub_name
- ret = shell_command(cmd)
- print "[ waiting for kill http server ]"
- time.sleep(3)
+ self.__test_self_repeat = False
- ###set forward between host and device###
- self.__forward_server_url = get_forward_connect(deviceid, stub_server_port)
- print "[ forward server %s ]" % self.__forward_server_url
+ test_opt = self.__get_test_options(
+ deviceid, test_launcher, testsuite_name)
- ###launch an new stub process###
- session_id = str(uuid.uuid1())
- print "[ launch the stub app ]"
- stub_entry = "%s --testsuite:%s --external-test:%s %s" % \
- (stub_name, testsuite_id, external_command, debug_opt)
- cmdline = "sdb -s %s shell %s" % (deviceid, stub_entry)
-
- self.__test_async_shell = StubExecThread(cmd=cmdline, sessionid=session_id)
- self.__test_async_shell.start()
+ if test_opt is None:
+ return None
- print "[ launch the tiny web app ]"
- tinycmd = 'sdb -s %s shell tinyweb -listening_ports 80,8080 -document_root /&' % deviceid
- self.__test_async_tiny = StubExecThread(cmd=tinycmd, sessionid=str(session_id+'_tiny'))
- self.__test_async_tiny.start()
+ timecnt = 0
+ blauched = False
+ # test suite is executed by framework of itself, no stub process needed
+ if self.__test_self_exec:
+ cmdline = WRT_START_STR % (deviceid, test_opt["suite_id"])
+ while timecnt < 3:
+ ret = shell_command(cmdline)
+ if len(ret) > 0 and ret[0].find('launched') != -1:
+ blauched = True
+ break
+ time.sleep(3)
+
+ if not blauched:
+ LOGGER.info("[ launch test widget \"%s\" but get failed! ]" %
+ test_opt["suite_name"])
+ return None
+ else:
+ return session_id
+ LOGGER.info("[ launch the stub httpserver ]")
+ cmdline = "sdb shell killall %s " % stub_app
+ ret = shell_command(cmdline)
time.sleep(2)
+ cmdline = "sdb -s %s shell %s --port:%s %s" \
+ % (deviceid, stub_app, stub_port, debug_opt)
+ self.__test_async_shell = StubExecThread(
+ cmd=cmdline, sessionid=session_id)
+ self.__test_async_shell.start()
+ self.__stub_server_url = _get_forward_connect(deviceid, stub_port)
- ###check if http server is ready for data transfer###
- timecnt = 0
while timecnt < 10:
- ret = http_request(get_url(self.__forward_server_url, "/check_server_status"), "GET", {})
+ time.sleep(1)
+ ret = http_request(get_url(
+ self.__stub_server_url, "/check_server_status"), "GET", {})
if ret is None:
- print "[ check server status, not ready yet! ]"
- time.sleep(1)
+ LOGGER.info("[ check server status, not ready yet! ]")
timecnt += 1
else:
if "error_code" in ret:
- print "[ check server status, get error code %d ! ]" % ret["error_code"]
- result = None
+ LOGGER.info("[ check server status, "
+ "get error code %d ! ]" % ret["error_code"])
+ return None
else:
- result = session_id
- print "[ check server status, get ready! ]"
- if capability_opt is not None:
- ret = http_request(get_url(self.__forward_server_url, "/set_capability"), "POST", capability_opt)
+ blauched = True
break
- return result
+
+ if blauched:
+ ret = http_request(get_url(
+ self.__stub_server_url, "/init_test"), "POST", test_opt)
+ if "error_code" in ret:
+ return None
+
+ if capability_opt is not None:
+ ret = http_request(get_url(self.__stub_server_url,
+ "/set_capability"),
+ "POST", capability_opt)
+ return session_id
+ else:
+ LOGGER.info("[ connect to server timeout! ]")
+ return None
def init_test(self, deviceid, params):
"""init the test envrionment"""
self.__device_id = deviceid
if "client-command" in params and params['client-command'] is not None:
self.__test_type = "webapi"
- return self.__init_test_stub(deviceid, params)
+ return self.__init_webtest_opt(deviceid, params)
else:
self.__test_type = "coreapi"
return str(uuid.uuid1())
- def __run_core_test(self, test_set_name, exetype, ctype, cases):
+ def __run_core_test(self, sessionid, test_set_name, exetype, cases):
"""
process the execution for core api test
"""
- self.__test_async_core = CoreTestExecThread(self.__device_id, test_set_name, exetype, cases)
+ self.__test_async_core = CoreTestExecThread(
+ self.__device_id, test_set_name, exetype, cases)
self.__test_async_core.start()
return True
- def __run_web_test(self, test_set_name, exetype, ctype, cases):
+ def __run_web_test(self, sessionid, test_set_name, exetype, ctype, cases):
"""
process the execution for web api test
- may be splitted to serveral blocks, with the unit size defined by block_size
+ may be splitted to serveral blocks,
+ with the unit size defined by block_size
"""
+ if self.__test_self_exec:
+ self.__test_async_shell = QUTestExecThread(
+ deviceid=self.__device_id,
+ sessionid=sessionid)
+ self.__test_async_shell.start()
+ return True
+
+ if self.__test_self_repeat:
+ global TEST_SERVER_RESULT, TEST_SERVER_STATUS
+ result_file = os.path.expanduser(
+ "~") + os.sep + sessionid + "_uifw.xml"
+ b_ok = _download_file(self.__device_id,
+ UIFW_RESULT,
+ result_file)
+ if b_ok:
+ TEST_SERVER_RESULT = {"resultfile": result_file}
+ TEST_SERVER_STATUS = {"finished": 1}
+ else:
+ TEST_SERVER_RESULT = {"resultfile": ""}
+ TEST_SERVER_STATUS = {"finished": 1}
+ return True
+
case_count = len(cases)
blknum = 0
if case_count % self.__test_set_block == 0:
block_data["cases"] = cases[start:end]
test_set_blocks.append(block_data)
idx += 1
- self.__test_async_http = WebTestExecThread(self.__forward_server_url, test_set_name, test_set_blocks)
+ self.__test_async_http = WebTestExecThread(
+ self.__stub_server_url, test_set_name, test_set_blocks)
self.__test_async_http.start()
return True
exetype = test_set["exetype"]
ctype = test_set["type"]
if self.__test_type == "webapi":
- return self.__run_web_test(test_set_name, exetype, ctype, cases)
+ return self.__run_web_test(sessionid, test_set_name,
+ exetype, ctype, cases)
else:
- return self.__run_core_test(test_set_name, exetype, ctype, cases)
+ return self.__run_core_test(sessionid, test_set_name,
+ exetype, cases)
def get_test_status(self, sessionid):
"""poll the test task status"""
- if sessionid is None:
+ if sessionid is None:
return None
result = {}
result["msg"] = []
- global test_server_status
- lockobj.acquire()
- if "finished" in test_server_status:
- result["finished"] = str(test_server_status["finished"])
+ global TEST_SERVER_STATUS
+ LOCK_OBJ.acquire()
+ if "finished" in TEST_SERVER_STATUS:
+ result["finished"] = str(TEST_SERVER_STATUS["finished"])
else:
result["finished"] = "0"
- test_server_status = {"finished": 0}
- lockobj.release()
+ TEST_SERVER_STATUS = {"finished": 0}
+ LOCK_OBJ.release()
return result
if sessionid is None:
return result
try:
- global test_server_result
- lockobj.acquire()
- result = test_server_result
- lockobj.release()
- except Exception, e:
- print e
-
+ global TEST_SERVER_RESULT
+ LOCK_OBJ.acquire()
+ result = TEST_SERVER_RESULT
+ LOCK_OBJ.release()
+ except OSError, error:
+ LOGGER.error(
+ "[ Error: failed to get test result, error:%s ]\n" % error)
return result
def finalize_test(self, sessionid):
"""clear the test stub and related resources"""
- if sessionid is None:
+ if sessionid is None:
return False
if self.__test_type == "webapi":
- ret = http_request(get_url(self.__forward_server_url, "/shut_down_server"), "GET", {})
+ if self.__test_auto_iu:
+ cmd = "sdb -s %s shell wrt-installer -un %s" \
+ % (self.__device_id, self.__test_wgt)
+ ret = shell_command(cmd)
+
+ ret = http_request(get_url(
+ self.__stub_server_url, "/shut_down_server"), "GET", {})
return True
-testremote = TizenMobile()
+
+def get_target_conn():
+ """ Get connection for Test Target"""
+ return TizenMobile()
#!/usr/bin/python
#
# Copyright (C) 2013 Intel Corporation
-#
+#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# Authors:
# Liu,chengtao <liux.chengtao@intel.com>
+"""General Implementation"""
-
-import logging,time,os,threading,sys
+import threading
+import logging
import logging.handlers
+import sys
+
+# logger levels
+LEVELS = {"CRITICAL": 50,
+ "ERROR": 40,
+ "WARNING": 30,
+ "INFO": 20,
+ "DEBUG": 10,
+ "NOTSET": 0
+ }
-#logger levels
-LEVELS={"CRITICAL" : 50,
- "ERROR" : 40,
- "WARNING" : 30,
- "INFO" : 20,
- "DEBUG" : 10,
- "NOTSET" : 0
- }
class Logger:
- '''Logger'''
- _instance=None
- _mutex=threading.Lock()
- def __init__(self, level="DEBUG"):
- '''Generate root logger'''
+ """General Logger Class"""
+ _instance = None
+ _mutex = threading.Lock()
+
+ def __init__(self, level="DEBUG", format_str="%(message)s"):
+ """Generate root logger"""
self._logger = logging.getLogger("TCT")
self._logger.setLevel(LEVELS[level])
- self._formatter = logging.Formatter("%(message)s")
+ self._formatter = logging.Formatter(format_str)
self.add_print_logger()
def add_print_logger(self, level="INFO"):
- '''Generate console writer [StreamHandler]'''
- ch = logging.StreamHandler()
- ch.setLevel(LEVELS[level])
- ch.setFormatter(self._formatter)
- self._logger.addHandler(ch)
+ """Generate console writer [StreamHandler]"""
+ writer = logging.StreamHandler(sys.stdout)
+ writer.setLevel(LEVELS[level])
+ writer.setFormatter(self._formatter)
+ self._logger.addHandler(writer)
@staticmethod
- def getLogger(level="DEBUG"):
- if(Logger._instance==None):
+ def get_logger(level="DEBUG", format_str="%(message)s"):
+ """sinlgeton of Logger"""
+ if Logger._instance is None:
Logger._mutex.acquire()
- if(Logger._instance==None):
- Logger._instance=Logger(level)
+ if Logger._instance is None:
+ Logger._instance = Logger(level, format_str)
else:
pass
Logger._mutex.release()
pass
return Logger._instance
- def debug(self,msg):
+ def debug(self, msg):
+ """debug level message"""
if msg is not None:
self._logger.debug(msg)
- def info(self,msg):
+ def info(self, msg):
+ """info level message"""
if msg is not None:
- self._logger.info(msg)
+ # self._logger.info(msg)
+ sys.stdout.write(msg + '\r\n')
+ sys.stdout.flush()
- def warning(self,msg):
+ def warning(self, msg):
+ """warning level message"""
if msg is not None:
self._logger.warning(msg)
- def error(self,msg):
+ def error(self, msg):
+ """error level message"""
if msg is not None:
self._logger.error(msg)
- def critical(self,msg):
+ def critical(self, msg):
+ """critical level message"""
if msg is not None:
self._logger.critical(msg)
+
+LOGGER = Logger.get_logger()
-testkit-lite (2.3.4) unstable; urgency=low
+testkit-lite (2.3.5) unstable; urgency=low
* TCT2.1 Release.
sys.path.append('/usr/lib/python2.7/dist-packages/')
if '/usr/share/pyshared' not in sys.path:
sys.path.append('/usr/share/pyshared/')
+
+# import logger
try:
- from testkitlite.common.process_killall import kill_testkit_lite
+ from commodule.log import LOGGER
except ImportError, e:
- print "[ Error: loading module killall failed, error: %s ]\n" % e
- print "try to run command 'export PYTHONPATH=/usr/lib/python2.7/dist-packages' to resolve this issue"
+ print "[ Error: loading logging failed, error: %s ]\n" % e
+ print "try to run command " \
+ "'export PYTHONPATH=/usr/lib/python2.7/dist-packages' and " \
+ "'export PYTHONPATH=/usr/share/pyshared/' to resolve this issue"
sys.exit(1)
+# import process kill
+try:
+ from testkitlite.common.process_killall import kill_testkit_lite
+except ImportError, e:
+ LOGGER.error("[ Error: loading module killall failed, error: %s ]\n" % e)
+ LOGGER.info("try to run command \
+'export PYTHONPATH=/usr/lib/python2.7/dist-packages' and \
+'export PYTHONPATH=/usr/share/pyshared/' to resolve this issue")
+ sys.exit(1)
JOIN = os.path.join
EXISTS = os.path.exists
"component": []}
# start testkit-lite in Singleton mode
-try:
- kill_testkit_lite(PID_FILE)
-except Exception, e:
- print "[ Error: fail to kill existing testkit-lite, error: %s ]\n" % e
+kill_testkit_lite(PID_FILE)
if not platform.system() == "Linux":
try:
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
except OSError, e:
- print "[ Error: create results directory: %s failed, \
- error: %s ]\n" % (LOG_DIR, e)
+ LOGGER.error("[ Error: create results directory:"
+ " %s failed, error: %s ]\n" % (LOG_DIR, e))
try:
with open(PID_FILE, "w") as fd:
PID = str(os.getpid())
fd.writelines(PID + '\n')
except OSError, e:
- print "[ Error: can't create pid log file: %s, \
- error: %s ]\n" % (PID_FILE, e)
+ LOGGER.error("[ Error: can't create pid log file: %s, error: %s ]\n" %
+ (PID_FILE, e))
sys.exit(1)
try:
except OSError, e:
pass
-try:
- if not EXISTS(TEST_PACKAGES_DIR):
- os.makedirs(TEST_PACKAGES_DIR)
-except OSError, e:
- print "[ Error: can't create test package directory: %s, \
- error: %s ]\n" % (TEST_PACKAGES_DIR, e)
- sys.exit(1)
-
# detect version option
if "--version" in sys.argv:
try:
VERSION_FILE = os.path.join(sys.path[0], 'VERSION')
CONFIG.read(VERSION_FILE)
VERSION = CONFIG.get('public_version', 'version')
- print "V%s" % VERSION
- except Exception, e:
- print "[ Error: fail to parse version info, error: %s ]\n" % e
+ LOGGER.info("V%s" % VERSION)
+ except ConfigParser.Error, error:
+ LOGGER.error(
+ "[ Error: fail to parse version info, error: %s ]\n" % error)
sys.exit(1)
# detect internal version option
CONFIG.read(VERSION_FILE)
VERSION = CONFIG.get('internal_version', 'version')
print VERSION
- except Exception, e:
- print "[ Error: fail to parse version info, error: %s ]\n" % e
+ except ConfigParser.Error, error:
+ print "[ Error: fail to parse version info, error: %s ]\n" % error
sys.exit(1)
from testkitlite.engines.default.runner import TRunner
from commodule.connector import Connector
except ImportError, e:
- print "[ Error: loading test engine failed, error: %s ]\n" % e
- print "try to run command \
- 'export PYTHONPATH=/usr/lib/python2.7/dist-packages' to resolve this issue"
+ LOGGER.error("[ Error: loading test engine failed, error: %s ]\n" % e)
+ LOGGER.info("try to run command "
+ "'export PYTHONPATH=/usr/lib/python2.7/dist-packages' and "
+ "'export PYTHONPATH=/usr/share/pyshared/'to resolve this issue")
sys.exit(1)
setattr(parser.values, option.dest, value)
try:
- option_list = [
+ OPTION_LIST = [
make_option("-f", "--testxml", dest="testxml",
action="callback", callback=varnarg,
- help="Specify the test.xml.If run more the one testxml,just list them all and separate with a whitespace"),
+ help="Specify the path of test definition file (tests.xml)."
+ " If run more one test package,just list the all the path "
+ " of \"tests.xml\" and separate with a whitespace"),
make_option("-D", "--dryrun", dest="bdryrun",
action="store_true",
help="Dry-run the selected test cases"),
If more than one testxml provided, \
results will be merged together to this output file"),
make_option("-e", dest="exttest", action="store",
- help="Launch external test with an executable file"),
+ help="Launch external test with a launcher, supports browser or other web-runtime"),
make_option("--fullscreen", dest="fullscreen",
action="store_true",
help="Run web API test in full screen mode"),
action="store_true",
help="Show internal version information"),
make_option("--deviceid", dest="device_serial", action="store",
- help="set sdb device serial information"),
+ help="set device serial information"),
make_option("--comm", dest="commodule", action="store",
- help="set commodule type: \"tizenmobile\" by default, \"localhost\" for single mode"),
+ help="set commodule by default,"
+ "set \"localhost\" for browser testing only"),
make_option("--capability", dest="capability", action="store",
- help="get capability file"),
+ help="set platform for sepecfic device capability"),
make_option("--quit", dest="quit", action="store_true",
help="quit testkit-lite"),
make_option("--debug", dest="debug", action="store_true",
- help="run in debug mode,more log information print out")
+ help="run in debug mode,more log information print out"),
+ make_option("--rerun", dest="rerun", action="store_true",
+ help="check if rerun test mode")
]
- option_list.extend(map(lambda flt:
- make_option("--%s" % flt, dest="w%s" % flt,
- action="callback", callback=varnarg,
- help="Select the specified filter-rules : %s" % flt),
- COMMON_FILTERS))
+ OPTION_LIST.extend([
+ make_option("--%s" % flt,
+ dest="w%s" % flt, action="callback", callback=varnarg,
+ help="Select the specified filter-rules : %s" % flt)
+ for flt in COMMON_FILTERS])
try:
# untrusted behaviour of %%prog
- USAGE = "%%prog [options] -f device:\"<somewhere/test.xml>\"\n\
-examples: %%prog -f device:\"<somewhere>/test.xml\"\n\
- %%prog -f device:\"test.xml\" -D\n\
- %%prog -f device:\"test.xml\" -A\n\
- %%prog -f device:\"test.xml\" -M\n\
- %%prog -f device:\"test.xml\" --capability <capability file>\n\
- %%prog -f device:\"test1.xml test2.xml test3.xml\" ...\n\
- %%prog -f device:\"test.xml\" -D -A --type type1 --capability <capability file> --comm <commoduletype>...\n\
- %%prog -f device:\"test.xml\" -D -A --type type1 --status ready ...\n\
-\n\
- run a webapi package: \n\
- %%prog -f device:\"/usr/share/webapi-webkit-tests/tests.xml\" -e 'WRTLauncher webapi-webkit-tests' -o /tmp/wekit-tests-result.xml --priority P0 --status ready ...\n\
- run both core and webapi packages: \n\
- %%prog -f device:\"/usr/share/webapi-webkit-tests/tests.xml /usr/share/tts-bluez-tests/tests.xml\" -e 'WRTLauncher webapi-webkit-tests' -o /tmp/wekit-tests-result.xml ...\n\
- run in single mode: \n\
- %%prog -f device:\"/usr/share/webapi-webkit-tests/tests.xml\" -e 'WRTLauncher webapi-webkit-tests' --comm localhost \n\
+ USAGE = "%%prog [options] -f [prefix:]\"<somewhere/test.xml>\" -e \"<launcher-name>\"\n\
+forms: %%prog -f [prefix:]\"<somewhere>/test.xml\"\n\
+ %%prog -f [prefix:]\"<somewhere>/test.xml\" -D\n\
+ %%prog -f [prefix:]\"<somewhere>/test.xml\" -A\n\
+ %%prog -f [prefix:]\"<somewhere>/test.xml\" -M\n\
+ %%prog -f [prefix:]\"<somewhere>/test1.xml <somewhere>/test2.xml <somewhere>/test3.xml\" \n\
+ %%prog -f [prefix:]\"<somewhere>/test.xml\" -D -A --type type1 --capability <capability file> --comm <commoduletype>\n\
+ %%prog -f [prefix:]\"<somewhere>/test.xml\" -D -A --type type1 --status ready ...\n\
+exmaples: \n\
+ run a web test package from device side with device WRT (it is default): \n\
+ %%prog -f device:\"/usr/share/webapi-webkit-tests/tests.xml\" -e 'WRTLauncher' -A \n\
+ run a web test package from local path with chrome browser: \n\
+ %%prog -f \"/usr/share/webapi-webkit-tests/tests.xml\" -e '<somewhere>/chrome-startup' -A --comm localhost \n\
\n\
Note: \n\
1) Proxy settings should be disabled when execute webapi packages\n\
4) Obviously -A and -M are conflict options\n\
5) -e option does not support -D mode\n\
6) The test cases' order in the result files might be arbitrary, when running same tests.xml with same options. This is caused by python's API 'getiterator' from module 'xml.etree.ElementTree'\n\
- 7) run command 'testkit-lite', it might not be able to locate module 'testkitlite.engines.default.runner', run command 'export PYTHONPATH=/usr/lib/python2.7/site-packages' to resolve this issue" % (LOG_DIR)
+ 7) run command 'testkit-lite', \
+ it might not be able to locate module 'testkitlite.engines.default.runner', \
+ run command 'export PYTHONPATH=/usr/share/pyshared/' \
+ run command 'export PYTHONPATH=/usr/lib/python2.7/dist-packages' \
+ to resolve this issue" % (LOG_DIR)
except Exception:
USAGE = None
if len(sys.argv) == 1:
sys.argv.append("-h")
- PARSERS = OptionParser(option_list=option_list, usage=USAGE)
+ PARSERS = OptionParser(option_list=OPTION_LIST, usage=USAGE)
- (options, args) = PARSERS.parse_args()
+ (OPTIONS, ARGS) = PARSERS.parse_args()
# detect quit action
- if options.quit:
+ if OPTIONS.quit:
try:
- print "[ Quit testkit-lite now ]"
+ LOGGER.info("[ Quit testkit-lite now ]")
kill_testkit_lite(PID_FILE)
except Exception, e:
- print "[ Error: fail to kill existing testkit-lite, error: %s ]\n" % e
- sys.exit(1)
+ LOGGER.error("[ Error: fail to kill existing testkit-lite,"
+ " error: %s ]\n" % e)
+ sys.exit(1)
# detect conflict
- if options.bautoonly and options.bmanualonly:
+ if OPTIONS.bautoonly and OPTIONS.bmanualonly:
raise ValueError("-A and -M are conflict")
- if options.commodule:
- COMMODULE_TYPE = options.commodule
+ if OPTIONS.commodule:
+ if OPTIONS.commodule == 'localhost' and "device:" in OPTIONS.testxml[0]:
+ raise ValueError("For single mode, pls set local file to test ")
+ COMMODULE_TYPE = OPTIONS.commodule
else:
COMMODULE_TYPE = "tizenmobile"
CONNECTOR = Connector({"testremote": COMMODULE_TYPE}).get_connector()
if CONNECTOR == None:
- print "[ Error: init commodule error... ]\n"
+ LOGGER.error("[ Error: init commodule error... ]\n")
sys.exit(1)
# create runner
- runner = TRunner(CONNECTOR)
- runner.set_pid_log(PID_FILE)
- # apply all options
+ RUNNER = TRunner(CONNECTOR)
+ RUNNER.set_pid_log(PID_FILE)
- runner.set_global_parameters(options)
+ # apply all options
+ RUNNER.set_global_parameters(OPTIONS)
# set capability
- if options.capability:
- get_capability_status = runner.get_capability(options.capability)
- if not get_capability_status:
+ if OPTIONS.capability:
+ GET_CAPABILITY_STATUS = RUNNER.get_capability(OPTIONS.capability)
+ if not GET_CAPABILITY_STATUS:
sys.exit(1)
- if "device:" in options.testxml[0]:
- print 'remote file'
- remote_testlits = options.testxml[0]
- remote_testlits = remote_testlits.split(':')[1]
- testlistarrary = remote_testlits.split()
- localarry = []
+ if "device:" in OPTIONS.testxml[0]:
+ try:
+ if not EXISTS(TEST_PACKAGES_DIR):
+ os.makedirs(TEST_PACKAGES_DIR)
+ except OSError, e:
+ LOGGER.error("[ Error: "
+ "can't create test package directory: %s, error: %s ]\n" %
+ (TEST_PACKAGES_DIR, e))
+ sys.exit(1)
+ REMOTE_TESTLITS = OPTIONS.testxml[0]
+ REMOTE_TESTLITS = REMOTE_TESTLITS.split(':')[1]
+ TESTLISTARRARY = REMOTE_TESTLITS.split()
+ LOCALARRY = []
- for remote_file in testlistarrary:
+ for remote_file in TESTLISTARRARY:
tmp_remote_file = os.path.split(remote_file)
tmp_remote_folder = os.path.basename(tmp_remote_file[0])
tmp_remote_test_xml = os.path.join(
tmp_remote_folder, tmp_remote_file[1])
local_test_package = os.path.join(
TEST_PACKAGES_DIR, tmp_remote_test_xml)
- down_status = runner.connector.download_file(
- runner.deviceid, remote_file, local_test_package)
+ down_status = RUNNER.connector.download_file(
+ RUNNER.deviceid, remote_file, local_test_package)
if not down_status:
- print 'remote file can not find,pls check the install test packages:%s' % remote_file
+ LOGGER.error('remote file can not find, "\
+ "pls check the install test packages:%s' % remote_file)
sys.exit(1)
- localarry.append(local_test_package)
- options.testxml = localarry
+ LOCALARRY.append(local_test_package)
+ OPTIONS.testxml = LOCALARRY
else:
- print 'local file'
- if len(options.testxml) == 1:
- local_testlists = options.testxml[0]
- testlistarrary = local_testlists.split(' ')
- options.testxml = testlistarrary
- print options.testxml
+ if len(OPTIONS.testxml) == 1:
+ LOCAL_TESTLISTS = OPTIONS.testxml[0]
+ TESTLISTARRARY = LOCAL_TESTLISTS.split(' ')
+ OPTIONS.testxml = TESTLISTARRARY
# apply filter
- wfilters = {}
+ WFILTERS = {}
for flt in COMMON_FILTERS:
- if eval('options.w%s' % flt):
- wfilters[flt] = eval('options.w%s' % flt)
- runner.add_filter_rules(**wfilters)
+ if eval('OPTIONS.w%s' % flt):
+ WFILTERS[flt] = eval('OPTIONS.w%s' % flt)
+ RUNNER.add_filter_rules(**WFILTERS)
- if not options.testxml:
- print "[ Error: not specify a test xml... ]\n"
+ if not OPTIONS.testxml:
+ LOGGER.error("[ Error: not specify a test xml... ]\n")
sys.exit(1)
# 1) prepare log dir
if os.name == "posix":
os.symlink(CURRENT_LOG_DIR, LATEST_DIR)
except IOError, e:
- print "[ Error: create session log directory: \
- %s failed, error: %s ]\n" % (CURRENT_LOG_DIR, e)
+ LOGGER.error("[ Error: create session log directory: "
+ "%s failed, error: %s ]\n" % (CURRENT_LOG_DIR, e))
- # 2) run test
+ # 2) prepare run test
# run more than one tests.xml
# 1. run all auto cases from the xmls
# 2. run all manual cases from the xmls
- if len(options.testxml) > 1:
- testxmls = set(options.testxml)
- for t in testxmls:
+ TESTXMLS = set(OPTIONS.testxml)
+ for t in TESTXMLS:
+ if EXISTS(t):
filename = t
filename = os.path.splitext(filename)[0]
if platform.system() == "Linux":
if not filename.startswith('/'):
- print "[ Error: xml file %s should start \
- with '/' ]" % filename
+ LOGGER.error("[ Error:"
+ " xml file %s should start with '/' ]" % filename)
sys.exit(1)
else:
filename = filename.split('/')[-2]
if filename == "":
- print "[ Error: unable to find package name info \
- from %s ]" % t
+ LOGGER.error("[ Error:"
+ " unable to find package name from %s ]" % t)
sys.exit(1)
else:
filename = filename.split('\\')[-2]
filename = "%s.total" % BASENAME(filename)
resultfile = "%s.xml" % filename
resultfile = JOIN(CURRENT_LOG_DIR, resultfile)
- ep = etree.parse(t)
- suiteparent = ep.getroot()
+ try:
+ ep = etree.parse(t)
+ suiteparent = ep.getroot()
+ except etree.ParseError, e:
+ LOGGER.error("[ Error: no case found in testxml, "
+ "pls check the test package ]\n")
+ sys.exit(1)
no_test_definition = 1
for tf in ep.getiterator('test_definition'):
no_test_definition = 0
for suite in ep.getiterator('suite'):
suite.tail = "\n"
suiteparent.append(suite)
- if options.bautoonly:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- if options.bmanualonly:
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.apply_filter(suiteparent)
+ if OPTIONS.bautoonly:
+ WFILTERS['execution_type'] = ["auto"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ if OPTIONS.bmanualonly:
+ WFILTERS['execution_type'] = ["manual"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ RUNNER.apply_filter(suiteparent)
# just leave suite and set for merge result
for suite in ep.getiterator('suite'):
for tset in suite.getiterator('set'):
tree = etree.ElementTree(element=suiteparent)
tree.write(output)
except IOError, e:
- print "[ Error: create filtered total result file: \
- %s failed, error: %s ]\n" % (resultfile, e)
- START_TIME = datetime.today().strftime("%Y-%m-%d_%H_%M_%S")
- if not options.bautoonly:
- if options.bmanualonly:
- for t in testxmls:
- try:
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(t, resultdir=CURRENT_LOG_DIR)
- except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (t, e)
- else:
- for t in testxmls:
- try:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(t, resultdir=CURRENT_LOG_DIR)
- except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (t, e)
- for t in testxmls:
- try:
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(t, resultdir=CURRENT_LOG_DIR)
- except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (t, e)
+ LOGGER.error(
+ "[ Error: create filtered total result file: %s failed, "
+ "error: %s ]\n" % (resultfile, e))
else:
- for t in testxmls:
+ print "[ Have no test xml found ]"
+ sys.exit(1)
+ START_TIME = datetime.today().strftime("%Y-%m-%d_%H_%M_%S")
+ if not OPTIONS.bautoonly:
+ if OPTIONS.bmanualonly:
+ for t in TESTXMLS:
try:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(t, resultdir=CURRENT_LOG_DIR)
+ WFILTERS['execution_type'] = ["manual"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ RUNNER.prepare_run(t, resultdir=CURRENT_LOG_DIR)
except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (t, e)
- # run only one tests.xml
- # 1. run all auto cases from the xml
- # 2. run all manual cases from the xml
- else:
- testxml = (options.testxml)[0]
- FILENAME = testxml
- filename = os.path.splitext(FILENAME)[0]
- if platform.system() == "Linux":
- if not filename.startswith('/'):
- print "[ Error: xml file %s should start with '/' ]" % filename
- sys.exit(1)
- else:
- filename = filename.split('/')[-2]
- if filename == "":
- print "[ Error: unable to find package name info \
- from %s ]" % testxml
- sys.exit(1)
+ LOGGER.error("[ Error: prepare_run test xml: "
+ "%s from testkit-lite failed, error: %s ]\n" % (t, e))
else:
- filename = filename.split('\\')[-2]
- filename = "%s.total" % BASENAME(filename)
- resultfile = "%s.xml" % filename
- resultfile = JOIN(CURRENT_LOG_DIR, resultfile)
- ep = etree.parse(testxml)
- suiteparent = ep.getroot()
- no_test_definition = 1
- for tf in ep.getiterator('test_definition'):
- no_test_definition = 0
- if no_test_definition:
- suiteparent = etree.Element('test_definition')
- suiteparent.tail = "\n"
- for suite in ep.getiterator('suite'):
- suite.tail = "\n"
- suiteparent.append(suite)
- if options.bautoonly:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- if options.bmanualonly:
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.apply_filter(suiteparent)
- # just leave suite and set for merge result
- for suite in ep.getiterator('suite'):
- for tset in suite.getiterator('set'):
- for testcase in tset.getiterator('testcase'):
- tset.remove(testcase)
- try:
- with open(resultfile, 'w') as output:
- TREE = etree.ElementTree(element=suiteparent)
- TREE.write(output)
- except IOError, e:
- print "[ Error: create filtered result file: \
- %s failed, error: %s ]\n" % (resultfile, e)
-
- START_TIME = datetime.today().strftime("%Y-%m-%d_%H_%M_%S")
- if not options.bautoonly:
- if options.bmanualonly:
+ for t in TESTXMLS:
try:
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(testxml, resultdir=CURRENT_LOG_DIR)
+ WFILTERS['execution_type'] = ["auto"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ RUNNER.prepare_run(t, resultdir=CURRENT_LOG_DIR)
except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (testxml, e)
- else:
+ LOGGER.error("[ Error: prepare_run test xml: "
+ "%s from testkit-lite failed, error: %s ]\n" % (t, e))
+ for t in TESTXMLS:
try:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(testxml, resultdir=CURRENT_LOG_DIR)
- wfilters['execution_type'] = ["manual"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(testxml, resultdir=CURRENT_LOG_DIR)
+ WFILTERS['execution_type'] = ["manual"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ RUNNER.prepare_run(t, resultdir=CURRENT_LOG_DIR)
except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (testxml, e)
- else:
+ LOGGER.error("[ Error: prepare_run test xml: "
+ "%s from testkit-lite failed, error: %s ]\n" % (t, e))
+ else:
+ for t in TESTXMLS:
try:
- wfilters['execution_type'] = ["auto"]
- runner.add_filter_rules(**wfilters)
- runner.prepare_run(testxml, resultdir=CURRENT_LOG_DIR)
+ WFILTERS['execution_type'] = ["auto"]
+ RUNNER.add_filter_rules(**WFILTERS)
+ RUNNER.prepare_run(t, resultdir=CURRENT_LOG_DIR)
except IOError, e:
- print "[ Error: prepare_run test xml: \
- %s from testkit-lite failed, error: %s ]\n" % (testxml, e)
+ LOGGER.error("[ Error: prepare_run test xml: "
+ "%s from testkit-lite failed, error: %s ]\n" % (t, e))
+
+ try:
+ RUNNER.run_case(CURRENT_LOG_DIR)
+ except Exception, e:
+ traceback.print_exc()
+ LOGGER.error("[ Error: run_test_case failed ,error: %s ]\n" % e)
try:
- runner.run_case(CURRENT_LOG_DIR)
- runner.merge_resultfile(START_TIME, CURRENT_LOG_DIR)
- print "[ all tasks for testkit lite are accomplished, goodbye ]"
+ RUNNER.merge_resultfile(START_TIME, CURRENT_LOG_DIR)
+ LOGGER.info("[ all tasks for testkit lite are accomplished, goodbye ]")
except Exception, e:
- print "[ Error: run_and_merge_resultfile from testkit-lite failed, \
- error: %s ]\n" % e
+ traceback.print_exc()
+ LOGGER.error("[ Error: merge_resultfile "
+ "failed,error: %s ]\n" % e)
except KeyboardInterrupt, e:
- print "\n[ exiting testkit-lite on user cancel ]\n"
+ LOGGER.info("\n[ exiting testkit-lite on user cancel ]\n")
sys.exit(1)
except Exception, e:
- print "\n[ Error: exiting testkit-lite by catching \
- a critical error: %s ]\n" % e
+ LOGGER.error("\n[ Error: exiting testkit-lite "
+ "by catching a critical error: %s ]\n" % e)
traceback.print_exc()
sys.exit(1)
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
#
# Authors:
# Zhang, Huihui <huihuix.zhang@intel.com>
# Wendong,Sui <weidongx.sun@intel.com>
-
+""" kill testkit-lite """
import os
import platform
import signal
import re
import ctypes
+from commodule.log import LOGGER
def killall(ppid):
"""Kill all children process by parent process ID"""
- OS = platform.system()
+ sys_platform = platform.system()
try:
- if OS == "Linux":
+ if sys_platform == "Linux":
ppid = str(ppid)
pidgrp = []
pid = pidgrp.pop()
try:
os.kill(int(pid), signal.SIGKILL)
- except Exception, e:
+ except OSError, error:
pattern = re.compile('No such process')
- match = pattern.search(str(e))
+ match = pattern.search(str(error))
if not match:
- print "[ Error: fail to kill pid: %s, error: %s ]\n" % (int(pid), e)
+ LOGGER.info(
+ "[ Error: fail to kill pid: %s, error: %s ]\n" % (
+ int(pid), error))
# kill for windows platform
else:
kernel32 = ctypes.windll.kernel32
handle = kernel32.OpenProcess(1, 0, int(ppid))
- kill_result = kernel32.TerminateProcess(handle, 0)
- except Exception, e:
+ # kill_result
+ kernel32.TerminateProcess(handle, 0)
+ except OSError, error:
pattern = re.compile('No such process')
- match = pattern.search(str(e))
+ match = pattern.search(str(error))
if not match:
- print "[ Error: fail to kill pid: %s, error: %s ]\n" % (int(ppid), e)
+ LOGGER.info("[ Error: fail to kill pid: %s, error: %s ]\n" % (
+ int(ppid), error))
return None
-def kill_testkit_lite(PID_FILE):
+def kill_testkit_lite(pid_file):
""" kill testkit lite"""
try:
- with open(PID_FILE, "r") as fd:
- pid = fd.readline().rstrip("\n")
+ with open(pid_file, "r") as pidfile:
+ pid = pidfile.readline().rstrip("\n")
if pid:
killall(pid)
- except Exception, e:
+ except IOError, error:
pattern = re.compile('No such file or directory|No such process')
- match = pattern.search(str(e))
+ match = pattern.search(str(error))
if not match:
- print "[ Error: fail to kill existing testkit-lite, error: %s ]\n" % e
+ LOGGER.info("[ Error: fail to kill existing testkit-lite, "\
+ "error: %s ]\n" % error)
return None
import platform
import time
import sys
-import traceback
import collections
from datetime import datetime
from shutil import copyfile
from tempfile import mktemp
from shutil import move
from os import remove
+from commodule.log import LOGGER
JOIN = os.path.join
self.stub_name = "httpserver"
self.capabilities = {}
self.has_capability = False
+ self.rerun = False
def set_global_parameters(self, options):
"get all options "
self.external_test = options.exttest
if options.debug:
self.debug = options.debug
+ if options.rerun:
+ self.rerun = options.rerun
def set_pid_log(self, pid_log):
""" get pid_log file """
resultfile = JOIN(resultdir, resultfile)
if not EXISTS(resultdir):
os.mkdir(resultdir)
- print "[ analysis test xml file: %s ]" % resultfile
+ LOGGER.info("[ analysis test xml file: %s ]" % resultfile)
self.__prepare_result_file(testxmlfile, resultfile)
self.__split_test_xml(resultfile, resultdir)
except IOError, error:
- traceback.print_exc()
- print error
+ LOGGER.error(error)
ok_prepare &= False
return ok_prepare
tree = etree.ElementTree(element=root)
tree.write(output)
except IOError, error:
- print "[ Error: create filtered result file: %s failed,\
- error: %s ]" % (suitefilename, error)
+ LOGGER.error( "[ Error: create filtered result file: %s failed,\
+ error: %s ]" % (suitefilename, error))
case_suite_find = etree.parse(
suitefilename).getiterator('testcase')
if case_suite_find:
tree = etree.ElementTree(element=suiteparent)
tree.write(output)
except IOError, error:
- print "[ Error: create filtered result file: %s failed,\
- error: %s ]" % (resultfile, error)
+ LOGGER.error("[ Error: create filtered result file: %s failed,\
+ error: %s ]" % (resultfile, error))
except IOError, error:
- print error
+ LOGGER.error(error)
return False
def run_case(self, latest_dir):
# print identical xml file name
if self.current_test_xml != temp_test_xml:
time.sleep(3)
- print "\n[ testing xml: %s.xml ]" % temp_test_xml
+ LOGGER.info("\n[ testing xml: %s.xml ]" % temp_test_xml)
self.current_test_xml = temp_test_xml
self.__run_with_commodule(core_auto_file)
# print identical xml file name
if self.current_test_xml != temp_test_xml:
time.sleep(3)
- print "\n[ testing xml: %s.xml ]" % temp_test_xml
+ LOGGER.info("\n[ testing xml: %s.xml ]" % temp_test_xml)
self.current_test_xml = temp_test_xml
if self.non_active:
self.skip_all_manual = True
def __run_webapi_test(self, latest_dir):
""" run webAPI test"""
if self.bdryrun:
- print "[ WRTLauncher mode does not support dryrun ]"
+ LOGGER.info("[ WRTLauncher mode does not support dryrun ]")
return True
list_auto = []
# print identical xml file name
if self.current_test_xml != JOIN(latest_dir, webapi_total_file):
time.sleep(3)
- print "\n[ testing xml: %s.xml ]\n" \
- % JOIN(latest_dir, webapi_total_file)
+ LOGGER.info("\n[ testing xml: %s.xml ]\n"
+ % JOIN(latest_dir, webapi_total_file))
self.current_test_xml = JOIN(latest_dir, webapi_total_file)
self.__run_with_commodule(webapi_file)
test_xml_set_list = self.__split_xml_to_set(webapi_file)
# create temporary parameter
for test_xml_set in test_xml_set_list:
- print "\n[ run set: %s ]" % test_xml_set
+ LOGGER.info("\n[ run set: %s ]" % test_xml_set)
# prepare the test JSON
self.__prepare_external_test_json(test_xml_set)
self.__shut_down_server(self.session_id)
break
except IOError, error:
- print "[ Error: fail to run webapi test xml, \
- error: %s ]" % error
+ LOGGER.error(
+ "[ Error: fail to run webapi test xml, error: %s ]" % error)
def __split_xml_to_set(self, webapi_file):
"""split xml by <set>"""
- print "[ split xml: %s by <set> ]" % webapi_file
- print "[ this might take some time, please wait ]"
+ LOGGER.info("[ split xml: %s by <set> ]" % webapi_file)
+ LOGGER.info("[ this might take some time, please wait ]")
set_number = 1
test_xml_set_list = []
self.resultfiles.discard(webapi_file)
set_number += 1
time.sleep(3)
set_number -= 1
- print "[ total set number is: %s ]" % set_number
+ LOGGER.info("[ total set number is: %s ]" % set_number)
# only keep one set in each xml file and remove empty set
test_xml_set_list_empty = []
for test_xml_set in test_xml_set_list:
test_xml_set_tmp = etree.parse(test_xml_set)
set_keep_number = 1
- print "[ process set: %s ]" % test_xml_set
+ LOGGER.info("[ process set: %s ]" % test_xml_set)
for temp_suite in test_xml_set_tmp.getiterator('suite'):
for test_xml_set_temp_set in temp_suite.getiterator('set'):
if set_keep_number != set_number:
set_keep_number += 1
set_number -= 1
test_xml_set_tmp.write(test_xml_set)
- # with open(test_xml_set, 'w') as output:
- # root = test_xml_set_tmp.getroot()
- # tree = etree.ElementTree(element=root)
- # tree.write(output)
for empty_set in test_xml_set_list_empty:
- print "[ remove empty set: %s ]" % empty_set
+ LOGGER.info("[ remove empty set: %s ]" % empty_set)
test_xml_set_list.remove(empty_set)
self.resultfiles.discard(empty_set)
mergefile = "%s.xml" % mergefile
mergefile = JOIN(latest_dir, mergefile)
end_time = datetime.today().strftime("%Y-%m-%d_%H_%M_%S")
- print "\n[ test complete at time: %s ]" % end_time
- print "[ start merging test result xml files, \
- this might take some time, please wait ]"
- print "[ merge result files into %s ]" % mergefile
+ LOGGER.info("\n[ test complete at time: %s ]" % end_time)
+ #LOGGER.info("[ start merging test result xml files, "\
+ # "this might take some time, please wait ]")
+ #LOGGER.info("[ merge result files into %s ]" % mergefile)
root = etree.Element('test_definition')
root.tail = "\n"
totals = set()
# print test summary
self.__print_summary()
# generate actual xml file
- print "[ generate result xml: %s ]" % mergefile
+ LOGGER.info("[ generate result xml: %s ]" % mergefile)
if self.skip_all_manual:
- print "[ some results of core manual cases are N/A, \
- please refer to the above result file ]"
- print "[ merge complete, write to the result file, \
- this might take some time, please wait ]"
+ LOGGER.info("[ some results of core manual cases are N/A,"\
+ "please refer to the above result file ]")
+ LOGGER.info("[ merge complete, write to the result file,"\
+ " this might take some time, please wait ]")
# get useful info for xml
# add environment node
# add summary node
- root.insert(0, self.__get_summary(start_time, end_time))
+ root.insert(0, get_summary(start_time, end_time))
root.insert(0, self.__get_environment())
# add XSL support to testkit-lite
declaration_text = """<?xml version="1.0" encoding="UTF-8"?>
tree = etree.ElementTree(element=root)
tree.write(output, xml_declaration=False, encoding='utf-8')
except IOError, error:
- print "[ Error: merge result file failed, error: %s ]" % error
+ LOGGER.error(
+ "[ Error: merge result file failed, error: %s ]" % error)
# change <![CDATA[]]> to <![CDATA[]]>
replace_cdata(mergefile)
# copy result to -o option
if os.path.splitext(self.resultfile)[-1] == '.xml':
if not os.path.exists(os.path.dirname(self.resultfile)):
os.makedirs(os.path.dirname(self.resultfile))
- print "[ copy result xml to output file: %s ]" % self.resultfile
+ LOGGER.info("[ copy result xml to output file:"\
+ " %s ]" % self.resultfile)
copyfile(mergefile, self.resultfile)
else:
- print "[ Please specify and xml file for result output, not:%s ]" % self.resultfile
+ LOGGER.info(
+ "[ Please specify and xml file for result output,"\
+ " not:%s ]" % self.resultfile)
except IOError, error:
- print "[ Error: fail to copy the result file to: %s, \
- please check if you have created its parent directory, \
- error: %s ]" % (self.resultfile, error)
+ LOGGER.error("[ Error: fail to copy the result file to: %s,"\
+ " please check if you have created its parent directory,"\
+ " error: %s ]" % (self.resultfile, error))
def __merge_result(self, setresultfiles, totals):
""" merge set result to total"""
totalfile = "%s.total" % totalfile
totalfile = "%s.xml" % totalfile
total_xml = etree.parse(totalfile)
-
- print "|--[ merge webapi result file: %s ]" % resultfile
+ #LOGGER.info("|--[ merge webapi result file: %s ]" % resultfile)
result_xml = etree.parse(resultfile)
for total_suite in total_xml.getiterator('suite'):
for total_set in total_suite.getiterator('set'):
for result_set in result_suite.getiterator('set'):
# when total xml and result xml have same suite
# name and set name
- if result_set.get('name') == total_set.get('name') and result_suite.get('name') == total_suite.get('name'):
- # set cases that doesn't have result in result set to N/A
- # append cases from result set to total set
- result_case_iterator = result_set.getiterator(
- 'testcase')
- if result_case_iterator:
- print "----[ suite: %s, set: %s, time: %s ]" % (result_suite.get('name'), result_set.get('name'), datetime.today().strftime("%Y-%m-%d_%H_%M_%S"))
- for result_case in result_case_iterator:
- try:
- self.__count_result(result_case)
- total_set.append(result_case)
- except IOError, error:
- print "[ Error: fail to append %s, error: %s ]" % (result_case.get('id'), error)
+ self.__merge_result_by_name(
+ result_set,total_set,result_suite, total_suite)
total_xml.write(totalfile)
totals.add(totalfile)
return totals
+ def __merge_result_by_name(
+ self,result_set,total_set,result_suite, total_suite):
+ ''' merge result select by name'''
+ if result_set.get('name') == total_set.get('name') \
+ and result_suite.get('name') == total_suite.get('name'):
+ # set cases that doesn't have result in result \
+ # set to N/A
+ # append cases from result set to total set
+ result_case_iterator = result_set.getiterator(
+ 'testcase')
+ if result_case_iterator:
+ #LOGGER.info("----[ suite: %s, set: %s, time: %s ]"
+ #% (result_suite.get('name'), result_set.get('name'),
+ # datetime.today().strftime("%Y-%m-%d_%H_%M_%S")))
+ for result_case in result_case_iterator:
+ try:
+ self.__count_result(result_case)
+ total_set.append(result_case)
+ except IOError, error:
+ LOGGER.error("[ Error: fail to append %s, error: %s ]"
+ % (result_case.get('id'), error))
def __count_result(self, result_case):
""" record the pass,failed,block,N/A case number"""
return environment
- def __get_summary(self, start_time, end_time):
- """ set summary node """
- summary = etree.Element('summary')
- summary.attrib['test_plan_name'] = "Empty test_plan_name"
- start_at = etree.Element('start_at')
- start_at.text = start_time
- end_at = etree.Element('end_at')
- end_at.text = end_time
- summary.append(start_at)
- summary.append(end_at)
- summary.tail = "\n "
- return summary
-
def __print_summary(self):
""" print test summary infomation"""
- print "[ test summary ]"
+ LOGGER.info("[ test summary ]")
total_case_number = int(self.testresult_dict["pass"]) \
+ int(self.testresult_dict["fail"]) \
+ int(self.testresult_dict["block"]) \
+ int(self.testresult_dict["not_run"])
- print " [ total case number: %s ]" % (total_case_number)
+ LOGGER.info(" [ total case number: %s ]" % (total_case_number))
if total_case_number == 0:
- print "[Warning: found 0 case from the result files, \
- if it's not right, please check the test xml files, or the filter values ]"
+ LOGGER.info("[Warning: found 0 case from the result files, "\
+ "if it's not right, please check the test xml files, "\
+ "or the filter values ]")
else:
- print " [ pass rate: %.2f%% ]" % (int(self.testresult_dict["pass"]) * 100 / int(total_case_number))
- print " [ PASS case number: %s ]" % self.testresult_dict["pass"]
- print " [ FAIL case number: %s ]" % self.testresult_dict["fail"]
- print " [ BLOCK case number: %s ]" % self.testresult_dict["block"]
- print " [ N/A case number: %s ]" % self.testresult_dict["not_run"]
+ LOGGER.info(" [ pass rate: %.2f%% ]" % (int(
+ self.testresult_dict["pass"]) * 100 / int(total_case_number)))
+ LOGGER.info(" [ PASS case number: %s ]" %
+ self.testresult_dict["pass"])
+ LOGGER.info(" [ FAIL case number: %s ]" %
+ self.testresult_dict["fail"])
+ LOGGER.info(" [ BLOCK case number: %s ]" %
+ self.testresult_dict["block"])
+ LOGGER.info(" [ N/A case number: %s ]" %
+ self.testresult_dict["not_run"])
def __prepare_external_test_json(self, resultfile):
"""Run external test"""
parameters = {}
xml_set_tmp = resultfile
# split set_xml by <case> get case parameters
- print "[ split xml: %s by <case> ]" % xml_set_tmp
- print "[ this might take some time, please wait ]"
+ LOGGER.info("[ split xml: %s by <case> ]" % xml_set_tmp)
+ LOGGER.info("[ this might take some time, please wait ]")
try:
parse_tree = etree.parse(xml_set_tmp)
root_em = parse_tree.getroot()
if tcase.find('description/test_script_entry') is not None:
case_detail_tmp["entry"] = tcase.find(
'description/test_script_entry').text
- if tcase.find('description/test_script_entry').get('timeout'):
+ if tcase.find(
+ 'description/test_script_entry').get('timeout'):
case_detail_tmp["timeout"] = tcase.find(
- 'description/test_script_entry').get('timeout')
- if tcase.find('description/test_script_entry').get('test_script_expected_result'):
+ 'description/test_script_entry'
+ ).get('timeout')
+ if tcase.find(
+ 'description/test_script_entry'
+ ).get('test_script_expected_result'):
case_detail_tmp["expected_result"] = tcase.find(
- 'description/test_script_entry').get('test_script_expected_result')
+ 'description/test_script_entry'
+ ).get('test_script_expected_result')
for this_step in tcase.getiterator("step"):
step_detail_tmp = {}
step_detail_tmp.setdefault("order", "1")
if tcase.find('measurement') is not None:
measures = tcase.getiterator('measurement')
measures_array = []
- for m in measures:
+ for measure in measures:
measure_json = {}
- measure_json['name'] = m.get('name')
- measure_json['file'] = m.get('file')
+ measure_json['name'] = measure.get('name')
+ measure_json['file'] = measure.get('file')
measures_array.append(measure_json)
case_detail_tmp['measures'] = measures_array
case_tmp.append(case_detail_tmp)
self.set_parameters = parameters
except IOError, error:
- print "[ Error: fail to prepare cases parameters, \
- error: %s ]\n" % error
+ LOGGER.error("[ Error: fail to prepare cases parameters, "\
+ "error: %s ]\n" % error)
return False
return True
# init stub and get the session_id
session_id = self.connector.init_test(self.deviceid, starup_prms)
if session_id == None:
- print "[ Error: Initialization Error]"
+ LOGGER.error("[ Error: Initialization Error]")
return False
else:
self.set_session_id(session_id)
""" prepare_starup_parameters """
starup_parameters = {}
- print "[ prepare_starup_parameters ]"
+ LOGGER.info("[ prepare_starup_parameters ]")
try:
parse_tree = etree.parse(testxml)
tsuite = parse_tree.getroot().getiterator('suite')[0]
+ tset = parse_tree.getroot().getiterator('set')[0]
starup_parameters['client-command'] = tsuite.get("launcher")
starup_parameters['testsuite-name'] = tsuite.get("name")
+ starup_parameters['testset-name'] = tset.get("name")
starup_parameters['stub-name'] = self.stub_name
- starup_parameters['external-test'] = self.external_test
+ if self.external_test is not None:
+ starup_parameters['external-test'] = self.external_test
starup_parameters['debug'] = self.debug
+ if self.rerun:
+ starup_parameters['rerun'] = self.rerun
if len(self.capabilities) > 0:
starup_parameters['capability'] = self.capabilities
except IOError, error:
- print "[ Error: prepare starup parameters, error: %s ]" % error
+ LOGGER.error(
+ "[ Error: prepare starup parameters, error: %s ]" % error)
return starup_parameters
- def __write_set_result(self, testxmlfile, result):
- '''
- get the result JSON form com_module,
- write them to orignal testxmlfile
-
- '''
- # write the set_result to set_xml
- set_result_json = result
- set_result_xml = testxmlfile
- # covert JOSN to python dict string
- set_result = set_result_json
- case_results = set_result["cases"]
- try:
- parse_tree = etree.parse(set_result_xml)
- root_em = parse_tree.getroot()
- for tset in root_em.getiterator('set'):
- for tcase in tset.getiterator('testcase'):
- for case_result in case_results:
- if tcase.get("id") == case_result['case_id']:
- tcase.set('result', case_result['result'].upper())
- # Check performance test
- if tcase.find('measurement') is not None:
- for m in tcase.getiterator('measurement'):
- if 'measures' in case_result:
- m_results = case_result['measures']
- for m_result in m_results:
- if m.get('name') == m_result['name']:
- m.set('value', m_result[
- 'value'])
- if tcase.find("./result_info") is not None:
- tcase.remove(tcase.find("./result_info"))
- result_info = etree.SubElement(tcase, "result_info")
- actual_result = etree.SubElement(
- result_info, "actual_result")
- actual_result.text = case_result['result'].upper()
-
- start = etree.SubElement(result_info, "start")
- end = etree.SubElement(result_info, "end")
- stdout = etree.SubElement(result_info, "stdout")
- stderr = etree.SubElement(result_info, "stderr")
- if 'start_time' in case_result:
- start.text = case_result['start_time']
- if 'end_time' in case_result:
- end.text = case_result['end_time']
- if 'stdout' in case_result:
- stdout.text = case_result['stdout']
- if 'stderr' in case_result:
- stderr.text = case_result['stderr']
- parse_tree.write(set_result_xml)
-
- print "[ cases result saved to resultfile ]\n"
- except IOError, error:
- print "[ Error: fail to write cases result, error: %s ]\n" % error
-
def __check_test_status(self):
'''
get_test_status from com_module
if session_status["finished"] == "0":
progress_msg_list = session_status["msg"]
for line in progress_msg_list:
- print line,
+ LOGGER.info(line)
return False
elif session_status["finished"] == "1":
return True
else:
- print "[ session status error ,pls finalize test ]\n"
+ LOGGER.error("[ session status error ,pls finalize test ]\n")
# return True to finished this set ,becasue server error
return True
def __shut_down_server(self, sessionid):
+ '''shut_down httpserver'''
try:
- print '[ show down server ]'
+ LOGGER.info('[ show down server ]')
self.connector.finalize_test(sessionid)
except Exception, error:
- print "[ Error: fail to close webapi http server, error: %s ]" % error
+ LOGGER.error("[ Error: fail to close webapi http server, "\
+ "error: %s ]" % error)
def get_capability(self, file_name):
"""get_capability from file """
self.set_capability(capabilities)
return True
except IOError, error:
- print "[ Error: fail to parse capability xml, error: %s ]" % error
+ LOGGER.error(
+ "[ Error: fail to parse capability xml, error: %s ]" % error)
return False
+ def __write_set_result(self,testxmlfile, result):
+ '''
+ get the result JSON form com_module,
+ write them to orignal testxmlfile
+
+ '''
+ # write the set_result to set_xml
+ set_result_xml = testxmlfile
+ # covert JOSN to python dict string
+ set_result = result
+ if 'resultfile' in set_result:
+ self.__write_file_result(set_result_xml, set_result)
+ else:
+ write_json_result(set_result_xml, set_result)
+
+ def __write_file_result(self,set_result_xml, set_result):
+ result_file = set_result['resultfile']
+ try:
+ if self.rerun:
+ LOGGER.info("[ Web UI FW Unit Test Does not support rerun.Result should be N/A ]\n")
+ else:
+ test_tree = etree.parse(set_result_xml)
+ test_em =test_tree.getroot()
+ result_tree = etree.parse(result_file)
+ result_em = result_tree.getroot()
+ for result_suite in result_em.getiterator('suite'):
+ for result_set in result_suite.getiterator('set'):
+ for test_suite in test_em.getiterator('suite'):
+ for test_set in test_suite.getiterator('set'):
+ if result_set.get('name') == test_set.get('name'):
+ test_suite.remove(test_set)
+ test_suite.append(result_set)
+ test_tree.write(set_result_xml)
+ LOGGER.info("[ cases result saved to resultfile ]\n")
+ except OSError, error:
+ traceback.print_exc()
+ LOGGER.error(
+ "[ Error: fail to write cases result, error: %s ]\n" % error)
def get_capability_form_node(capability_em):
if tcap.get("type").lower() == 'integer':
if tcap.get("support").lower() == 'true':
- if tcap.getiterator("value") and tcap.find("value").text is not None:
+ if tcap.getiterator(
+ "value") and tcap.find("value").text is not None:
capability[tmp_key] = int(tcap.find("value").text)
if tcap.get("type").lower() == 'string':
if tcap.get("support").lower() == 'true':
- if tcap.getiterator("value") and tcap.find("value").text is not None:
+ if tcap.getiterator(
+ "value") and tcap.find("value").text is not None:
capability[tmp_key] = tcap.find("value").text
return capability
version = config.get('public_version', 'version')
return version
except KeyError, error:
- print "[ Error: fail to parse version info, error: %s ]\n" % error
+ LOGGER.error(
+ "[ Error: fail to parse version info, error: %s ]\n" % error)
return ""
remove(file_name)
move(abs_path, file_name)
except IOError, error:
- print "[ Error: fail to replace cdata in the result file, \
- error: %s ]\n" % error
+ LOGGER.error("[ Error: fail to replace cdata in the result file, "\
+ "error: %s ]\n" % error)
def extract_notes(buf, pattern):
notes_elm.text = extract_notes(buf, pattern)
else:
notes_elm.text += "\n" + extract_notes(buf, pattern)
+
+def get_summary(start_time, end_time):
+ """ set summary node """
+ summary = etree.Element('summary')
+ summary.attrib['test_plan_name'] = "Empty test_plan_name"
+ start_at = etree.Element('start_at')
+ start_at.text = start_time
+ end_at = etree.Element('end_at')
+ end_at.text = end_time
+ summary.append(start_at)
+ summary.append(end_at)
+ summary.tail = "\n "
+ return summary
+
+def write_json_result(set_result_xml, set_result):
+ ''' fetch result form JSON'''
+
+ case_results = set_result["cases"]
+ try:
+ parse_tree = etree.parse(set_result_xml)
+ root_em = parse_tree.getroot()
+ for tset in root_em.getiterator('set'):
+ for tcase in tset.getiterator('testcase'):
+ for case_result in case_results:
+ if tcase.get("id") == case_result['case_id']:
+ tcase.set('result', case_result['result'].upper())
+ # Check performance test
+ if tcase.find('measurement') is not None:
+ for measurement in tcase.getiterator(
+ 'measurement'):
+ if 'measures' in case_result:
+ m_results = case_result['measures']
+ for m_result in m_results:
+ if measurement.get(
+ 'name') == m_result['name'] and 'value' in m_result:
+ measurement.set(
+ 'value', m_result[
+ 'value'])
+ if tcase.find("./result_info") is not None:
+ tcase.remove(tcase.find("./result_info"))
+ result_info = etree.SubElement(tcase, "result_info")
+ actual_result = etree.SubElement(
+ result_info, "actual_result")
+ actual_result.text = case_result['result'].upper()
+
+ start = etree.SubElement(result_info, "start")
+ end = etree.SubElement(result_info, "end")
+ stdout = etree.SubElement(result_info, "stdout")
+ stderr = etree.SubElement(result_info, "stderr")
+ if 'start_at' in case_result:
+ start.text = case_result['start_at']
+ if 'end_at' in case_result:
+ end.text = case_result['end_at']
+ if 'stdout' in case_result:
+ stdout.text = case_result['stdout']
+ if 'stderr' in case_result:
+ stderr.text = case_result['stderr']
+ parse_tree.write(set_result_xml)
+
+ LOGGER.info("[ cases result saved to resultfile ]\n")
+ except IOError, error:
+ traceback.print_exc()
+ LOGGER.error(
+ "[ Error: fail to write cases result, error: %s ]\n" % error)
+
+
+
+
+
--- /dev/null
+#!/bin/bash
+
+PWD=`pwd`
+
+nohup google-chrome --allow-file-access-from-files --disable-web-security --start-maximized --user-data-dir=$PWD/result/data $PWD/web/index.html &
--- /dev/null
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
--- /dev/null
+2013-04-24 15:31:58 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers for ww17.3 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+-- 2013WW16.5 Release --
+
+2013-04-19 15:46:42 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers in *.spec and configure.ac files for ww16.5 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-04-18 02:34:35 +0800 gex.zhang <gex.zhang@intel.com>
+Updated tizen:application 'id' in config.xml and added 'package'
+M webapi-w3c-fileapi-tests/config.xml.wgt
+
+-- 2013WW16.3 Release --
+
+2013-04-17 16:21:53 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers for ww16.3 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+-- 2013WW15.5 Release --
+
+2013-04-12 10:22:01 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers in *.spec and configure.ac files for ww15.5 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-04-11 16:05:37 +0800 weiwei.fan <weiwix.fan@intel.com>
+Fixed TTS-1187 by updating the spec url of FileAPI
+M webapi-w3c-fileapi-tests/fileapi/Blob_example_call_slice.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_contentType_undefined.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_end_negative.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_no_contentType.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_start_negative.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero_five.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_type_normal.html
+M webapi-w3c-fileapi-tests/fileapi/Blob_type_return_empty_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileList_example_access_file_element.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_constructor_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_Blob_invalid.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_empty_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_no_argument.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_arraybuffer.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_type.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_set_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_Blob_invalid.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_empty_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_no_argument.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_type.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_set_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_Blob_invalid.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_empty_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_no_argument.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_type.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_set_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_Blob_invalid.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_empty_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_no_argument.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_string.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_type.html
+M webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_set_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_abort_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_DONE.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_EMPTY.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_in_worker.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_error_SecurityError.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_error_return_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_event_bubbles_false.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_event_cancelable_false.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_return_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_return_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_exception_InvalidStateError.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_occur_error.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_set_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exception_InvalidStateError.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exist.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_occur_error.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_set_blob_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_Blob_invalid.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_exception_InvalidStateError.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_occur_error.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_set_blob_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_base.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_exception_InvalidStateError.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_invalid_encoding.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_occur_error.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null_optional.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_when_call_set_optional.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsArrayBuffer.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsBinaryString.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsDataURL.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsText.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_call_abort.html
+M webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_occur_error.html
+M webapi-w3c-fileapi-tests/fileapi/File_example_error_progress.html
+M webapi-w3c-fileapi-tests/fileapi/File_example_handle_progress.html
+M webapi-w3c-fileapi-tests/fileapi/File_example_success_progress.html
+M webapi-w3c-fileapi-tests/fileapi/File_inherits_blob.html
+M webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_is_Date.html
+M webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_normal.html
+M webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_readonly.html
+M webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_type.html
+M webapi-w3c-fileapi-tests/fileapi/File_name_normal.html
+M webapi-w3c-fileapi-tests/fileapi/File_name_type.html
+M webapi-w3c-fileapi-tests/fileapi/URL_example_obtain_blob_object.html
+M webapi-w3c-fileapi-tests/fileapi/URL_in_webworker.html
+M webapi-w3c-fileapi-tests/tests.xml
+
+2013-04-11 22:52:44 +0800 Zhiqiang Zhang <zhiqiang.zhang@intel.com>
+Extracted WRTLanucher into tools/ from each test suite
+D webapi-w3c-fileapi-tests/WRTLauncher
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-04-10 06:57:56 +0800 wanmingx.lin <wanmingx.lin@intel.com>
+Updated README files to match current package structure
+M webapi-w3c-fileapi-tests/README
+
+-- 2013WW14.3 Release --
+
+2013-04-03 16:10:37 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers in configure.ac and *.spec files for ww14 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-03-29 20:12:29 +0800 wanmingx.lin <wanmingx.lin@intel.com>
+Updated component category section specification in tests.xml files
+M webapi-w3c-fileapi-tests/tests.xml
+
+-- 2013WW13.5 Release --
+
+2013-03-29 14:53:58 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version number in configure.ac and *.spec files for ww13.5 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-03-26 19:09:49 +0800 Zhiqiang Zhang <zhiqiang.zhang@intel.com>
+Unified WRTLauncher to fix install confict
+M webapi-w3c-fileapi-tests/WRTLauncher
+
+-- 2013WW12.5 Release --
+
+2013-03-22 18:21:38 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated Changelog files to catch all changes since ww10.5 release
+M webapi-w3c-fileapi-tests/Changelog
+
+2013-03-22 11:14:16 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Updated version numbers in */configure.ac and */*.spec files for ww12.5 release
+M webapi-w3c-fileapi-tests/configure.ac
+M webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+2013-03-21 17:48:43 +0800 wanmingx.lin <wanmingx.lin@intel.com>
+Move README files to testsuites
+M webapi-w3c-fileapi-tests/README
+D webapi-w3c-fileapi-tests/fileapi/README
+
+2013-03-21 14:11:48 +0800 weiwei.fan <weiwix.fan@intel.com>
+Fixed TTS-1068 by updating webapi-w3c-fileapi-tests/tests.xml
+M webapi-w3c-fileapi-tests/tests.xml
+
+2013-03-20 17:49:36 +0800 wanmingx.lin <wanmingx.lin@intel.com>
+Upgrated testharness in all test suites
+M webapi-w3c-fileapi-tests/resources/COPYING
+M webapi-w3c-fileapi-tests/resources/testharness.css
+M webapi-w3c-fileapi-tests/resources/testharness.js
+M webapi-w3c-fileapi-tests/resources/testharnessreport.js
+
+2013-03-15 11:30:13 +0800 jiehua.xiong <jiehuax.xiong@intel.com>
+Rollbacked *.png *.wgt *.ogv files from 'fromdos'
+M webapi-w3c-fileapi-tests/custom.png
+
+2013-03-15 01:24:04 +0800 Zhiqiang Zhang <zhiqiang.zhang@intel.com>
+Repackaged test suites per spec and lowercased 2nd level folders
+A webapi-w3c-fileapi-tests/COPYING
+A webapi-w3c-fileapi-tests/Changelog
+A webapi-w3c-fileapi-tests/Makefile.am
+A webapi-w3c-fileapi-tests/README
+A webapi-w3c-fileapi-tests/WRTLauncher
+A webapi-w3c-fileapi-tests/autogen
+A webapi-w3c-fileapi-tests/config.xml.crx
+A webapi-w3c-fileapi-tests/config.xml.wgt
+A webapi-w3c-fileapi-tests/configure.ac
+A webapi-w3c-fileapi-tests/custom.png
+A webapi-w3c-fileapi-tests/fileapi/Blob_example_call_slice.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_exist.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_is_not_null.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_normal.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_return_zero.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_size_type.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_contentType_normal.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_contentType_undefined.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_end_negative.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_exist.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_no_contentType.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_overflow.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_return_blob.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_start_negative.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_two_five.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_type.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero_five.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero_size.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_type_exist.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_type_normal.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_type_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_type_return_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/Blob_type_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_example_access_file_element.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_index_max.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_index_negative.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_index_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_index_zero.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_large_number.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_item_no_file.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_length_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_length_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_length_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_length_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileList_length_zero.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_constructor_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_constructor_base.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_Blob_invalid.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_empty_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_exist.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_no_argument.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_arraybuffer.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_arraybuffer.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_type.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_set_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_set_null.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_Blob_invalid.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_empty_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_exist.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_no_argument.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_type.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_set_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_set_null.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_Blob_invalid.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_empty_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_exist.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_no_argument.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_type.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_set_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_set_null.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_Blob_invalid.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_empty_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_exist.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_no_argument.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_string.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_type.js
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_set_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_set_null.js
+A webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_value.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_value.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_value.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_abort_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_abort_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_DONE.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_EMPTY.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_construct.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_in_worker.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_in_worker.js
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_SecurityError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_attribute_DOMError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_error_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_event_bubbles_false.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_event_cancelable_false.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_when_call_abort.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_when_read_fail.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onload_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onload_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onload_when_read_completed.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_when_read_completed.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_when_read_start.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_return_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_when_reading.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_exception_InvalidStateError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_occur_error.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_set_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exception_InvalidStateError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_occur_error.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_set_blob_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_exception_InvalidStateError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_occur_error.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_set_blob_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_Blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_base.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_empty_string.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_exception_InvalidStateError.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_invalid_encoding.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_occur_error.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null_optional.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_when_call_set_optional.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_exist.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_one.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_two.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_type.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_zero.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsArrayBuffer.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsBinaryString.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsDataURL.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsText.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_default_value.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_call_abort.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_occur_error.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_readyState_two.html
+A webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_readyState_zero.html
+A webapi-w3c-fileapi-tests/fileapi/File_example_error_progress.html
+A webapi-w3c-fileapi-tests/fileapi/File_example_handle_progress.html
+A webapi-w3c-fileapi-tests/fileapi/File_example_success_progress.html
+A webapi-w3c-fileapi-tests/fileapi/File_inherits_blob.html
+A webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_exist.html
+A webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_is_Date.html
+A webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_normal.html
+A webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_type.html
+A webapi-w3c-fileapi-tests/fileapi/File_name_exist.html
+A webapi-w3c-fileapi-tests/fileapi/File_name_normal.html
+A webapi-w3c-fileapi-tests/fileapi/File_name_readonly.html
+A webapi-w3c-fileapi-tests/fileapi/File_name_type.html
+A webapi-w3c-fileapi-tests/fileapi/Makefile.am
+A webapi-w3c-fileapi-tests/fileapi/README
+A webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_base.html
+A webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_blob_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_exist.html
+A webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/URL_example_obtain_blob_object.html
+A webapi-w3c-fileapi-tests/fileapi/URL_in_webworker.html
+A webapi-w3c-fileapi-tests/fileapi/URL_in_webworker.js
+A webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_exist.html
+A webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_no_argument.html
+A webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_url_invalid.html
+A webapi-w3c-fileapi-tests/fileapi/filereader_sync.js
+A webapi-w3c-fileapi-tests/fileapi/filesupport.js
+A webapi-w3c-fileapi-tests/fileapi/support/Makefile.am
+A webapi-w3c-fileapi-tests/fileapi/support/worker.js
+A webapi-w3c-fileapi-tests/manifest.json
+A webapi-w3c-fileapi-tests/pack.sh
+A webapi-w3c-fileapi-tests/resources/COPYING
+A webapi-w3c-fileapi-tests/resources/Makefile.am
+A webapi-w3c-fileapi-tests/resources/blacklist.clamshell
+A webapi-w3c-fileapi-tests/resources/blacklist.default
+A webapi-w3c-fileapi-tests/resources/blacklist.js
+A webapi-w3c-fileapi-tests/resources/testharness.css
+A webapi-w3c-fileapi-tests/resources/testharness.js
+A webapi-w3c-fileapi-tests/resources/testharnessreport.js
+A webapi-w3c-fileapi-tests/testcase.xsl
+A webapi-w3c-fileapi-tests/testkit/Makefile.am
+A webapi-w3c-fileapi-tests/testkit/web/index.html
+A webapi-w3c-fileapi-tests/testkit/web/jquery.js
+A webapi-w3c-fileapi-tests/testkit/web/manual_harness.html
+A webapi-w3c-fileapi-tests/testkit/web/manualharness.html
+A webapi-w3c-fileapi-tests/testresult.xsl
+A webapi-w3c-fileapi-tests/tests.css
+A webapi-w3c-fileapi-tests/tests.xml
+A webapi-w3c-fileapi-tests/webapi-w3c-fileapi-tests.spec
+
+-- 2013WW10.5 Release --
+
--- /dev/null
+----------------------------------------------
+Introduction
+----------------------------------------------
+These tests are for checkeing compliance with W3C File API specification:
+http://www.w3.org/TR/2011/WD-FileAPI-20111020/
+
+----------------------------------------------
+Test Environment
+----------------------------------------------
+1. Chromium does not support loading local files from local browser by default. If you want to load local files, you must add the boot argument like 'chromium-browser --allow-file-access-from-files'.
+
+
+----------------------------------------------
+Installation
+----------------------------------------------
+None
+
+
+----------------------------------------------
+Build and Run
+----------------------------------------------
+(Suppose you only get the source code and Testkit-Lite has been set up on your test machine.
+ If you have obtained webapi-w3c-fileapi-tests RPM package, you can directly go to step 3 on the test machine;
+ if you have not installed Testkit-lite, you need to install the latest version.)
+
+Steps:
+1. Prepare for building by running the following command:
+ cd webapi-w3c-fileapi-tests
+2. (Optional) If you run tests on Lunchbox, you need to remove below cases from tests.xml:
+ FileReader_abort_when_readyState_EMPTY.html
+ FileReader_abort_when_readyState_DONE.html
+3. Build RPM package by running the following command:
+ pack.sh -t all
+4. Install RPM on the test machine as "root" user by running the following command:
+ rpm -ivh webapi-w3c-fileapi-tests-<version>-<release>.<arch>.rpm
+5. Run test cases as "normal" user with the following command:
+ testkit-lite -e "chromium-browser --allow-file-access-from-files '/opt/testkit/web/index.html'" -f tests.xml -o result.xml
+
+
+----------------------------------------------
+Known Issues
+----------------------------------------------
+For test cases:
+ FileReader_abort_when_readyState_EMPTY.html
+ FileReader_abort_when_readyState_DONE.html
+If you run them on Lunchbox, you need to use the boot argument '--id '.
+For example, testkit-lite -e "chromium-browser --allow-file-access-from-files '/opt/testkit/web/index.html'" -f tests.xml -o result.xml --id FileReader_abort_when_readyState_EMPTY
+
+For test cases:
+ File_example_error_progress.html
+ FileReader_readAsArrayBuffer_occur_error.html
+ FileReader_readAsBinaryString_occur_error.html
+ FileReader_readAsText_occur_error.html
+ FileReader_readAsDataURL_occur_error.html
+ FileReader_result_when_occur_error.html
+ FileReader_error_type.html
+ FileReader_error_SecurityError.html
+ FileReader_error_attribute_DOMError.html
+If you run them on Chromimum, you need not to add the boot argument like 'chromium-browser --allow-file-access-from-files'.
+You cannot run them on Lunchbox due to image issue.
+
+Note: You can report the defects of this test suite to Fan,Weiwei <weiwix.fan@intel.com>.
+
+----------------------------------------------
+Todo
+----------------------------------------------
+1. To format existing test cases.
+2. To design tests to cover all specications P1, P2, and P3 testing.
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_example_call_slice</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of illustrating the different types of slice calls possible" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var flag = true;
+ function RunTest() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ // slice() method has vendor prefixes on some browsers
+ file.slice = file.slice || file.webkitSlice || file.mozSlice;
+ // create an identical copy of file
+ // the two calls below are equivalent
+ var fileClone = file.slice();
+ if (!fileClone || fileClone.size != file.size) {
+ flag = false;
+ }
+ var fileClone2 = file.slice(0, file.size);
+ if (!fileClone2 || fileClone2.size != file.size) {
+ flag = false;
+ }
+ // Note the use of negative number
+ var fileChunkFromEnd = file.slice(-(Math.round(file.size/2)));
+
+ //obtain half of the file size
+ var halfSize = Math.round(file.size/2);
+
+ if (!fileChunkFromEnd || fileChunkFromEnd.size != halfSize) {
+ flag = false;
+ }
+ // slice file into 1/2 chunk starting at beginning of file
+ var fileChunkFromStart = file.slice(0, Math.round(file.size/2));
+ if (!fileChunkFromStart || fileChunkFromStart.size != halfSize) {
+ flag = false;
+ }
+ // slice file from beginning till 150 bytes before end
+ var fileNoMetadata = file.slice(0, -150, "application/experimental");
+ if (!fileNoMetadata || fileNoMetadata.size != Math.max(file.size - 150, 0)) {
+ flag = false;
+ }
+ if (flag) {
+ PassTest();
+ } else {
+ flag = true;
+ FailTest("This example has an error");
+ }
+ } else {
+ FailTest("fail to obtain file object");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if Blob.size is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ t.step(function() {
+ assert_true("size" in blob, "size is missing");
+ });
+ t.done();
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_is_not_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check the attribute of the interface Blob size is not null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload file</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileSize = blob.size;
+ t.step(function () {
+ assert_true(fileSize != null, "The Blob.size is null");
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_normal</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check the attribute of the interface Blob size is not null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id=log></div>
+ <script>
+ var t = async_test(document.title);
+ try {
+ var expected = 10;
+ var bb = initBlobBuilder();
+ var text = '0123456789';
+ bb.append(text);
+ blob = bb.getBlob();
+ t.step(function() {
+ assert_true(blob.size == expected);
+ });
+ t.done();
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if Blob.size is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var TEN = 10;
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ var iniValue = blob.size;
+ blob.size = iniValue + TEN;
+ if (blob.size == iniValue && blob.size != iniValue + TEN) {
+ PassTest();
+ } else {
+ FailTest("Blob.size is not readonly");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_return_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute size value of interface Blob,when the upload empty file,return 0" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a empty file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileSize = blob.size;
+ t.step(function () {
+ assert_equals(fileSize, 0, "No upload empty file and lead to failure.");
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_size_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check the attribute of the interface Blob size is number type" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileSize= blob.size;
+ t.step(function () {
+ assert_true(typeof fileSize === "number","The Blob.size type is not number");
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_contentType_normal</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the contentType parameter has a normal value that expecting a new Blob object is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var newBlob = blob.slice(0, blob.size, "text/plain");
+ if (newBlob && newBlob !== blob) {
+ PassTest();
+ } else {
+ FailTest("Not return a new Blob");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_contentType_undefined</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the relativeContentType be set to the empty string when the contentType parameter is undefined" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var newBlob = blob.slice(0, blob.size, undefined);
+ if (newBlob && newBlob.type === "") {
+ PassTest();
+ } else {
+ FailTest("The relativeContentType is not empty string");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_end_negative</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the relativeEnd is max((size + end), 0) when the end parameter is negative" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var end = -2;
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ //actual
+ var result1 = blob.slice(0, end);
+ //expected
+ var result2 = blob.slice(0, Math.max(blob.size + end, 0));
+ if (result1.size == result2.size) {
+ PassTest();
+ } else {
+ FailTest("Fail to get expected result");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if Blob.slice is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ if (blob.slice != "undefined" && blob.slice instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("Blob.slice is not exist");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob set no parameter" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ try{
+ var blob = document.getElementById("fileUplodad").files[0];
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var newBlob = blob.slice();
+ if (newBlob != null) {
+ PassTest();
+ } else {
+ FailTest("Slice() method returns null");
+ }
+ } catch (e) {
+ alert("Throw an exception " + e);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_no_contentType</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the relativeContentType be set to the empty string when the contentType parameter is not provided" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var result = blob.slice(0, blob.size);
+ if (result.type === "") {
+ PassTest();
+ } else {
+ FailTest("The relativeContentType is not empty string");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_overflow</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 1998 and end to 2999" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id=log></div>
+ <script>
+ var t = async_test(document.title);
+ var expected = 2;
+ try {
+ var bb = initBlobBuilder();
+ var text = '';
+ for (var i = 0; i < 2000; ++i) text +='A';
+ bb.append(text);
+ blob = bb.getBlob();
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ sliceBlob = blob.slice(1998, 2999);
+ t.step(function() {
+ assert_true(sliceBlob.size === expected);
+ });
+ t.done();
+ } catch (e) {
+ t.step(function() {
+ assert_true(false, "Occur an exception" + e);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_return_blob</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob return blob" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ try {
+ var blob = document.getElementById("fileUplodad").files[0];
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var newBlob = blob.slice(0, 100);
+ t.step(function () {
+ assert_true(newBlob.toString() === "[object Blob]");
+ });
+ t.done();
+ } catch (ex) {
+ t.step(function () {
+ assert_true(false, "Throw an exception " + ex);
+ });
+ t.done();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_start_negative</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the relativeStart is max((size + start), 0)) when the start prameter is negative" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var start = -2;
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ // slice() method has vendor prefixes on some browsers
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ //actual
+ var result1 = blob.slice(start, blob.size);
+ //expected
+ var result2 = blob.slice(Math.max(blob.size + start, 0), blob.size);
+ if (result1.size == result2.size) {
+ PassTest();
+ } else {
+ FailTest("Fail to get expected result");
+ }
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: Blob_slice_two_five</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 2 and end to 5" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var expected = 3;
+ try {
+ var bb = initBlobBuilder();
+ var text = "0123456789";
+ bb.append(text);
+ var blob = bb.getBlob();
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var sliceBlob = blob.slice(2, 5);
+ t.step(function() {
+ assert_equals(sliceBlob.size, expected);
+ });
+ t.done();
+ } catch(ex) {
+ t.step(function() {
+ assert_true(false, "Throw an exception " + ex);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob return type" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ try {
+ var blob = document.getElementById("fileUplodad").files[0];
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var newBlob = blob.slice(0, 100);
+ t.step(function () {
+ assert_true(typeof newBlob == "object");
+ });
+ t.done();
+ } catch (ex) {
+ t.step(function () {
+ assert_true(false, "Throw an exception " + ex);
+ });
+ t.done();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 0 and end to 10" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var expected = 10;
+ try {
+ var bb = initBlobBuilder();
+ var text = "0123456789";
+ bb.append(text);
+ var blob = bb.getBlob();
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var sliceBlob = blob.slice(0);
+ if(sliceBlob.size === expected) {
+ PassTest();
+ } else {
+ FailTest("Blob.size is not 10");
+ }
+ } catch(ex) {
+ FailTest("Occur an exception " + ex);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_zero_five</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 0 and end to 5" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var expected = 5;
+ try {
+ var bb = initBlobBuilder();
+ var text = "0123456789";
+ bb.append(text);
+ var blob = bb.getBlob();
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var sliceBlob = blob.slice(0, 5);
+ if(sliceBlob.size === expected) {
+ PassTest();
+ } else {
+ FailTest("Blob.size is not 5");
+ }
+ } catch (ex) {
+ FailTest("Occur an exception " + ex);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_slice_zero_size</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 0 and end to size" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var expected = 10;
+ try {
+ var bb = initBlobBuilder();
+ var text = "0123456789";
+ bb.append(text);
+ var blob = bb.getBlob();
+ blob.slice = blob.slice || blob.webkitSlice || blob.mozSlice;
+ var sliceBlob = blob.slice(0, text.length);
+ t.step(function() {
+ assert_equals(sliceBlob.size, expected);
+ });
+ t.done();
+ } catch(ex) {
+ t.step(function() {
+ assert_true(false, "Throw an exception " + ex);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_type_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if Blob.type is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a blob object
+ var blob = document.getElementById('file').files[0];
+ if (blob) {
+ t.step(function() {
+ assert_true("type" in blob, "The type attribute is misssing");
+ });
+ t.done();
+ } else {
+ FailTest("Fail to get Blob object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_type_normal</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute type value of interface Blob return the media type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a html file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileType = blob.type;
+ if (fileType != undefined && fileType == "text/html") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_type_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute type value of interface Blob is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var type = blob.type;
+ blob.type = "text/d";
+ if (blob.type === type && blob.type !== "text/d") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test:Blob_type_return_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute type value of interface Blob return empty string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" size="80" onchange="showFileList()" />
+ <h3>Please upload a file with no extension.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ try {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileType = blob.type;
+ if (fileType === "") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: Blob_type_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute type value of interface Blob is string type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var fileType = blob.type;
+ if (typeof fileType === "string") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_example_access_file_element</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filelist" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of using DOM access to the file element within a form" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <form id="uploadData">
+ <input id="fileChooser" type="file" multiple size="80" onchange="RunTest();" />
+ </form>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // uploadData is a form element
+ // fileChooser is input element of type 'file'
+ var file1 = document.forms['uploadData']['fileChooser'].files[0];
+
+ // alternative syntax can be
+ var file2 = document.forms['uploadData']['fileChooser'].files.item(0);
+
+ if (file1 && file2 && file1 === file2) {
+ PassTest();
+ } else {
+ FailTest("Fail to get File object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileList.item has a valid argument that expecting a File object is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList () {
+ try {
+ var file = document.getElementById("fileUplodad").files.item(0);
+ if (file && file instanceof File) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute item value of interface FileList is exist" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <form name="uploadData">
+ <input type="file" id="fileChooser" name="fileChooser"/>
+ </form>
+ <script type="text/javascript">
+ var fileList = document.forms['uploadData']['fileChooser'].files;
+ test(
+ function() {
+ try {
+ assert_true(fileList.item !== undefined && fileList.item instanceof Function);
+ } catch (ex) {
+ assert_true(false, "Throw an exception " + ex);
+ }
+ }
+ , document.title
+ );
+ document.getElementById("fileChooser").style.display="none";
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_index_max</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileList.item returns the last File object in the FileList when the value of argument index is one less than the number of File objects" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList && fileList instanceof FileList) {
+ var maxLength = fileList.length -1;
+ var file = fileList.item(maxLength);
+ if (file && file instanceof File) {
+ PassTest();
+ } else {
+ FailTest("Not return a File object");
+ }
+ } else {
+ FailTest("Fail to get FileList object");
+ }
+ } catch (ex) {
+ FailTest("Throw an ex exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_index_negative</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method item of interface FileList set -3" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList () {
+ var file = document.getElementById("fileUplodad").files;
+ if (!("item" in file)) {
+ FailTest("item() method is not exist");
+ } else {
+ var newFile;
+ try {
+ var newFile = file.item(-3);
+ } catch (e) {
+ } finally {
+ if (newFile == null) {
+ PassTest();
+ } else {
+ FailTest("the item() method does not return null");
+ }
+ }
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_index_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileList.item returns a File object in the FileList when the value of argument index is null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList && fileList instanceof FileList) {
+ var file = fileList.item(null);
+ if (file && file instanceof File) {
+ PassTest();
+ } else {
+ FailTest("Not return a File object");
+ }
+ } else {
+ FailTest("Fail to get FileList object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_index_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method item of interface FileList set 0" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList () {
+ var files = document.getElementById("fileUplodad").files;
+ try {
+ var item = files.item(0);
+ if (item != undefined && item == "[object File]") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ } catch (e) {
+ FailTest(e.message);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileList_item_large_number</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method item of interface FileList set 3" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload less than 3 file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList () {
+ var files = document.getElementById("fileUplodad").files;
+ try {
+ var file = files.item(3);
+ if (file == null) {
+ PassTest();
+ } else {
+ FailTest("item() method does not return null");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileList.item has no argument that expecting an exception is to be thrown" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList && "item" in fileList) {
+ try {
+ fileList.item();
+ } catch (ex) {
+ PassTest();
+ }
+ FailTest("No exception be thrown");
+ } else {
+ FailTest("item() method is not exist");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_item_no_file</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method item of interface FileList has no file will return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" />
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ try {
+ var file = document.getElementById("fileUplodad").files.item(0);
+ if (file == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_length_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute length value of interface FileList" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload 2 file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var fileLength = document.getElementById("fileUplodad").files.length;
+ if (fileLength != null && fileLength == 2) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_length_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute length value of interface FileList is exist" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <form name="uploadData">
+ <input type="file" id="fileChooser" name="fileChooser"/>
+ </form>
+ <script type="text/javascript">
+ var file = document.forms['uploadData']['fileChooser'].files;
+ test(function() {
+ assert_true("length" in file, "the length attribute is missing");
+ }, document.title);
+ document.getElementById("fileChooser").style.display="none";
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_length_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute length value of interface FileList is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var fileList = document.getElementById("fileUplodad").files;
+ var listLen = fileList.length
+ fileList.length = "abc";
+ if (listLen === fileList.length && fileList.length !== "abc") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileList_length_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute length value of interface FileList return type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var fileLength = document.getElementById("fileUplodad").files.length;
+ if (fileLength != undefined && typeof fileLength === "number") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileList_length_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length" />
+ <meta name="assert" content="Check if the attribute length value of interface FileList return 0" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body >
+ <input id="fileUplodad" type="file" multiple size="80" />
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var files = document.getElementById("fileUplodad").files;
+ var fileLength = files.length;
+ if (fileLength == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_constructor_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the user agent MUST return a new FileReaderSync object when the FileReaderSync() constructor is invoked" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_constructor_base.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (fileReaderSync && fileReaderSync instanceof FileReaderSync) {
+ postMessage("PASS");
+ } else {
+ postMessage("The user agent not return a new FileReaderSync object");
+ }
+
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is invalid" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_Blob_invalid.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ try {
+ if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ }
+ fileReaderSync.readAsArrayBuffer(6);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsDataURL_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if obtain an ArrayBuffer object using the readAsArrayBuffer method by FileReaderSync interface" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ expected = "[object ArrayBuffer]";
+ var worker = new Worker("filereader_sync.js");
+ worker.postMessage("fileReaderSync_readAsArrayBuffer");
+ worker.onmessage = t.step_func(function(event) {
+ assert_equals(event.data,expected);
+ t.done();
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is empty string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_empty_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ }
+ try {
+ fileReaderSync.readAsArrayBuffer("");
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_exist.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (fileReaderSync.readAsArrayBuffer != "undefined" && fileReaderSync.readAsArrayBuffer instanceof Function) {
+ postMessage("PASS");
+ } else {
+ postMessage("The method FileReaderSync.readAsArrayBuffer is not exist");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer has no argument that expecting an exception is to be thrown" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_no_argument.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ try {
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ } else if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ } else {
+ fileReaderSync.readAsArrayBuffer();
+ postMessage("Not throw an exception");
+ }
+ }catch (ex){
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_return_arraybuffer</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer has a valid argument that expecting the data contents of blob as an ArrayBuffer is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_return_arraybuffer.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var arraybuffer = fileReaderSync.readAsArrayBuffer(blob);
+ if (arraybuffer && arraybuffer instanceof ArrayBuffer) {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsArrayBuffer_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the return value of FileReaderSync.readAsArrayBuffer is of ArrayBuffer object type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_return_type.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var arraybuffer = fileReaderSync.readAsArrayBuffer(blob);
+ if (arraybuffer && arraybuffer.toString() == "[object ArrayBuffer]") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsArrayBuffer_set_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsArrayBuffer_set_null.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsArrayBuffer) {
+ postMessage("The readAsArrayBuffer method is not exist");
+ }
+ try {
+ fileReaderSync.readAsArrayBuffer(null);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsBinaryString_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString has a invalid argument that expecting an exception is to be thrown" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_Blob_invalid.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsBinaryString) {
+ postMessage("The readAsBinaryString method is not exist");
+ }
+ try {
+ fileReaderSync.readAsBinaryString(6);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsDataURL_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if read a blob text using readAsBinaryString method by FileReaderSync interface" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ expected = "fileReaderSync readAsBinaryString is OK";
+ var worker = new Worker("filereader_sync.js");
+ worker.postMessage("fileReaderSync_readAsBinaryString");
+ worker.onmessage = t.step_func(function(event) {
+ assert_equals(event.data,expected);
+ t.done();
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsBinaryString_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString throws an exception when the argument is empty string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_empty_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsBinaryString) {
+ postMessage("The readAsBinaryString method is not exist");
+ }
+ try {
+ fileReaderSync.readAsBinaryString("");
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsBinaryString_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_exist.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (fileReaderSync.readAsBinaryString != "undefined" && fileReaderSync.readAsBinaryString instanceof Function) {
+ postMessage("PASS");
+ } else {
+ postMessage("The method FileReaderSync.readAsBinaryString is not exist");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsBinaryString_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString has no argument that expecting an exception is to be thrown"/>
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_no_argument.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ try {
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ } else if (fileReaderSync.readAsBinaryString == undefined) {
+ postMessage("The readAsBinaryString method is not exist");
+ } else {
+ fileReaderSync.readAsBinaryString();
+ postMessage("Not throw an exception");
+ }
+ } catch (ex){
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsBinaryString_return_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString has a valid argument that expecting the data contents of blob as an binary string is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_return_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsBinaryString) {
+ postMessage("The readAsBinaryString method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var binaryString = fileReaderSync.readAsBinaryString(blob);
+ if (binaryString && binaryString == "Hello world!") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsBinaryString_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the return value of FileReaderSync.readAsBinaryString is of type string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_return_type.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsBinaryString) {
+ postMessage("The readAsBinaryString method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var binaryString = fileReaderSync.readAsBinaryString(blob);
+ if (binaryString && typeof binaryString == "string") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsBinaryString_set_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsBinaryString throws an exception when the argument is null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsBinaryString_set_null.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsBinaryString) {
+ postMessage("The readAsBinaryString method is not exist");
+ }
+ try {
+ fileReaderSync.readAsBinaryString(null);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL throws an exception when the argument is invalid" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_Blob_invalid.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ fileReaderSync.readAsDataURL(6);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsDataURL_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if returns the data of blob as a Data URL by FileReaderSync interface" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ expected = "data:text/plain;base64,ZmlsZVJlYWRlclN5bmMgcmVhZEFzRGF0YVVSTCBpcyBPSw==";
+ var worker = new Worker("filereader_sync.js");
+ worker.postMessage("fileReaderSync_readAsDataURL");
+ worker.onmessage = t.step_func(function(event) {
+ assert_equals(event.data,expected);
+ t.done();
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL throws an exception when the argument is empty string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_empty_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ fileReaderSync.readAsDataURL("");
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsDataURL_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_exist.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (fileReaderSync.readAsDataURL != "undefined" && fileReaderSync.readAsDataURL instanceof Function) {
+ postMessage("PASS");
+ } else {
+ postMessage("The method FileReaderSync.readAsDataURL is not exist");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL has no argument that expecting an exception is to be thrown"/>
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_no_argument.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ fileReaderSync.readAsDataURL();
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_return_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL has a valid argument that expecting the data contents of blob as a Data URL is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_return_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var dataUrl = fileReaderSync.readAsDataURL(blob);
+ if (dataUrl && dataUrl.indexOf("data:") != "-1") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the return value of FileReaderSync.readAsDataURL is of type string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_return_type.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var dataUrl = fileReaderSync.readAsDataURL(blob);
+ if (dataUrl && typeof dataUrl == "string") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsDataURL_set_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsDataURL throws an exception when the argument is null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsDataURL_set_null.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsDataURL) {
+ postMessage("The readAsDataURL method is not exist");
+ }
+ try {
+ fileReaderSync.readAsDataURL(null);
+ postMessage("Not throw an exception");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText throws an exception when the argument is invalid" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_Blob_invalid.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ var text = fileReaderSync.readAsText(6);
+ postMessage("Fail to fileReaderSync.readAsText a invalid's blob");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if read a blob text using readAsText by FileReaderSync interface" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ expected = "fileReaderSync readAsText is OK";
+ var worker = new Worker("filereader_sync.js");
+ worker.postMessage("fileReaderSync_readAsText");
+ worker.onmessage = t.step_func(function(event) {
+ assert_equals(event.data,expected);
+ t.done();
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText throws an exception when the argument is empty string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_empty_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+</body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ var text = fileReaderSync.readAsText("");
+ postMessage("Not any exception be thrown");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_exist.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (fileReaderSync.readAsText != "undefined" && fileReaderSync.readAsText instanceof Function) {
+ postMessage("PASS");
+ } else {
+ postMessage("The method FileReaderSync.readAsText is not exist");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>FileAPI Test: FileReaderSync_readAsText_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText has no argument that expecting an exception is to be thrown"/>
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_no_argument.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ var text = fileReaderSync.readAsText();
+ postMessage("Fail to fileReaderSync.readAsText() with no argument");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_return_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText has a valid argument that expecting the data contents of blob using the encoding determination algorithm is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_return_string.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var text = fileReaderSync.readAsText(blob);
+ if (text && text == "Hello world!") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_return_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the return value of FileReaderSync.readAsText is of type string" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_return_type.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ //obtain a Blob object
+ self.BlobBuilder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+ if (!self.BlobBuilder) {
+ postMessage("The browser does not support BlobBuilder interface");
+ }
+ var builder = new self.BlobBuilder();
+ builder.append("Hello world!");
+ var blob = builder.getBlob("text/plain");
+ if (!blob) {
+ postMessage("Fail to obtain a Blob object");
+ }
+ var text = fileReaderSync.readAsText(blob);
+
+ if (text && typeof text == "string") {
+ postMessage("PASS");
+ } else {
+ postMessage("Fail to read the blob");
+ }
+ } catch (ex) {
+ postMessage("Occur an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReaderSync_readAsText_set_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReaderSync.readAsText throws an exception when the argument is null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReaderSync_readAsText_set_null.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ var fileReaderSync = new FileReaderSync();
+ if (!fileReaderSync) {
+ postMessage("Fail to get FileReaderSync object");
+ }
+ if (!fileReaderSync.readAsText) {
+ postMessage("The readAsText method is not exist");
+ }
+ try {
+ var text = fileReaderSync.readAsText(null);
+ postMessage("Not any exception be thrown");
+ } catch (ex) {
+ postMessage("PASS");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_DONE_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.DONE is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.DONE != "undefined") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.DONE is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_DONE_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.DONE is of type number" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (typeof fileReader.DONE == "number") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.DONE is not of type number");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_DONE_value</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the value of constant FileReader.DONE is 2" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ var TEN = 10;
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.DONE === 2) {
+ PassTest();
+ } else {
+ FailTest("The value of constant FileReader.DONE is not 2");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_EMPTY_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.EMPTY is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.EMPTY != "undefined") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.EMPTY is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_EMPTY_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.EMPTY is of type number" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (typeof fileReader.EMPTY == "number") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.EMPTY is not of type number");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_EMPTY_value</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the value of constant FileReader.EMPTY is 0" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ var TEN = 10;
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.EMPTY === 0) {
+ PassTest();
+ } else {
+ FailTest("The value of constant FileReader.EMPTY is not 0");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_LOADING_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.LOADING is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.LOADING != "undefined") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.LOADING is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_LOADING_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the constant FileReader.LOADING is of type number" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (typeof fileReader.LOADING == "number") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.LOADING is not of type number");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_LOADING_value</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the value of constant FileReader.LOADING is 1" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ var TEN = 10;
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.LOADING === 1) {
+ PassTest();
+ } else {
+ FailTest("The value of constant FileReader.LOADING is not 1");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_abort_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method abort value of FileReader interface,when the abort() method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var expected = 2;
+
+ setup({timeout : 3600000});
+
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.abort();
+ reader.onabort = function () {
+ t.step(function() {
+ assert_equals(reader.readyState, expected, "The readState ");
+ });
+ t.done();
+ };
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_abort_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-abort" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.abort is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.abort && fileReader.abort instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method FileReader.abort is not exist");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_abort_when_readyState_DONE</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.abort is called when readyState is DONE that expecting FileReader.result is to be set null" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <input id="file" type="file" multiple size="80" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+
+ var node = document.getElementById('file');
+ node.onchange = t.step_func(function () {
+ // obtain input element through DOM
+ var file = node.files[0];
+ getAsText(file);
+ });
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ // Handle success event
+ reader.onload = t.step_func(function loaded(evt) {
+ if (reader.readyState == reader.DONE) {
+ reader.abort();
+ reader.onabort = t.step_func(function () {
+ // If readyState = EMPTY or if readyState = DONE set result to null when the abort() method is called
+ assert_true(reader.result === null, "The value of result is " + reader.result);
+ t.done();
+ });
+ } else {
+ assert_unreached("read state error: " + reader.readyState);
+ t.done();
+ }
+ });
+ // handle error event
+ reader.onerror = t.step_func(function (e) {
+ assert_unreached("readAsText() error: " + e.target.error.name);
+ t.done();
+ });
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_abort_when_readyState_EMPTY</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.abort is called when readyState is EMPTY that expecting FileReader.result is to be set null" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ try {
+ var reader = new FileReader();
+ // EMPTY is the default state of a newly minted FileReader object, until one of the read methods have been called on it
+ if (reader.readyState == reader.EMPTY) {
+ reader.abort();
+ reader.onabort = t.step_func(function () {
+ // if the readyState is EMPTY (no read method has been called) then the result attribute MUST return null
+ assert_true(reader.result === null, "The value of result is " + reader.result);
+ t.done();
+ });
+ } else {
+ t.step(function () {
+ assert_unreached("read state error: " + reader.readyState);
+ });
+ t.done();
+ }
+ } catch (ex) {
+ t.step(function () {
+ assert_unreached("throws exception: " + ex);
+ });
+ t.done();
+ }
+ window.setTimeout(function() {
+ t.step(function () {
+ assert_unreached("abort event is not fired");
+ });
+ t.done();
+ }, 3000);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_construct</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check the construct of the interface FileReader" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id=log></div>
+ <script>
+ var t = async_test(document.title);
+ expected = "[object FileReader]"
+ try{
+ var reader = new FileReader();
+ t.step(function() {
+ assert_true(reader.toString() === expected);
+ });
+ t.done();
+ } catch(e) {
+ t.step(function() {
+ assert_true(false, "Occur an exception" + e.name);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_constructor_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the user agent must return a new FileReader object when the FileReader() constructor is invoked" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (fileReader && fileReader instanceof FileReader) {
+ PassTest();
+ } else {
+ FailTest("Not return a FileReader object");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_constructor_in_worker</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader's constructor must be available when in environments where the global object is represented by a WorkerGlobalScope object" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./FileReader_constructor_in_worker.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ try {
+ var fileReader = new FileReader();
+ if (fileReader && fileReader instanceof FileReader) {
+ postMessage("PASS");
+ } else {
+ postMessage("FileReader's constructor not be available when in web worker");
+ }
+ } catch (ex) {
+ postMessage("Throw an exception " + ex);
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_error_SecurityError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.error return a 'SecurityError' DOMError when certain files are unsafe for access within a Web application" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ var reader = new FileReader();
+ //Handle loaded and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(file, "UTF-16");
+ } else {
+ FailTest("fail to get the file object");
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur an error");
+ }
+
+ function errorHandler(evt) {
+ try {
+ var reader = evt.target;
+ if (!reader) {
+ FailTest("Fail to obtain a FileReader object");
+ }
+ if (!(reader.error.toString() == "[object DOMError]")) {
+ FailTest("FileReader.error is not of DOMError object type");
+ }
+ if (reader.error.name == "SecurityError") {
+ PassTest();
+ } else {
+ FailTest("The error name is " + error.name);
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex.code);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test:FileReader_error_attribute_DOMError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute error value of FileReader interface,the error attribute of the FileReader object MUST return a DOMError object,if there has been an error" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if(file){
+ var reader = new FileReader();
+ //Handle loaded and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsText(file);
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur an error");
+ }
+
+ function errorHandler(evt) {
+ try {
+ var reader = evt.target;
+ if (!reader) {
+ FailTest("Fail to obtain a FileReader object");
+ }
+ if (!(reader.error.toString() == "[object DOMError]")) {
+ FailTest("FileReader.error is not of DOMError object type");
+ }
+ PassTest();
+ } catch (ex) {
+ FailTest("Throw an exception " + ex.name);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_error_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method error in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_true("error" in reader, "The error attribute is missing");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_error_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.error is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ try {
+ var reader = new FileReader();
+ if (!reader) {
+ FailTest("Fail to obtain a FileReader object");
+ } else {
+ var iniValue = reader.error;
+ var err = new Error("error");
+ reader.error = err;
+ if (reader.error == iniValue && reader.error != err) {
+ PassTest();
+ } else {
+ FailTest("FileReader.error is not readonly");
+ }
+ }
+ } catch (ex) {
+ FailTest("Throw an exception");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_error_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the attribute error value of FileReader interface return null." />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var error = reader.error;
+ if (error == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_error_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.error is of DOMError object type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ var reader = evt.target;
+ //only FireFox support DOMError
+ if (reader && reader.error.toString() == "[object DOMError]") {
+ PassTest();
+ } else {
+ FailTest("FileReader.error is not of DOMError object type");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_event_bubbles_false</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the progress event e does not bubble or e.bubbles MUST be false" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ if (evt.bubbles) {
+ FailTest("e.bubbles is not false");
+ } else {
+ PassTest();
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_event_cancelable_false</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the progress event e is NOT cancelable or e.cancelable MUST be false" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ if (evt.cancelable) {
+ FailTest("e.cancelable is not false");
+ } else {
+ PassTest();
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onabort_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onabort in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onabort");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onabort_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onabort value of FileReader interface return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onabort;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReader_onabort_when_call_abort</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onabort value of FileReader interface,fire the event abort When the read has been aborted" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.abort();
+ reader.onabort = function () {
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onerror_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onerror in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onerror");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onerror_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onerror value of FileReader interface return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onerror;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onerror_when_read_fail</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onerror value of FileReader interface,fire the event loadstart when the read has failed" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.abort();
+ reader.onerror= function () {
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onload_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onload in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onload");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onload_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onload value of FileReader interface return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onload;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onload_when_read_completed</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onload value of FileReader interface, fire the event loadstart when the read has successfully completed" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.onload = load;
+ function load(){
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Xu,Liyu liyux.xu@intel.com
+
+ Revision history:
+ Date Author Description
+ 05-10-2012 Xu,Liyu liyux.xu@intel.com case creation
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onloadend_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onloadend in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onloadend");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test:FileReader_onloadend_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onloadend value of FileReader interface return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onloadend;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onloadend_when_read_completed</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onloadend value of FileReader interface,fire the event loadend when the request has completed" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.abort();
+ reader.onloadend = function () {
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onloadstart_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onloadstart in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onloadstart");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onloadstart_when_read_start</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onloadstart value of FileReader interface return null." />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onloadstart;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileAPI_FileReader_onloadstart_when_read_start</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the attribute onloadstart value of FileReader interface,fire the event loadstart when the read starts" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var blob = document.getElementById("fileUplodad").files[0];
+ var reader = new FileReader();
+ reader.onloadstart = start;
+ reader.readAsArrayBuffer(blob);
+ function start() {
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onprogress_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method onprogress in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "onprogress");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onprogress_return_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onprogress value of FileReader interface return null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ var d = reader.onprogress;
+ if (d == null) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_onprogress_when_reading</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute onprogress value of FileReader interface,fire the event loadstart While reading (and decoding) blob, and reporting partial Blob data" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsText(blob,"UTF-8");
+ reader.onprogress = proress;
+ function proress() {
+ PassTest();
+ }
+ setTimeout(FailTest, 3000);
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsArrayBuffer value of FileReader interface set invalid value blo has error" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsArrayBuffer(blo);
+ FailTest();
+ } catch(e){
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsArrayBuffer value of FileReader interface,When the readAsArrayBuffer(blob) method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload a file.</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsArrayBuffer(blob);
+ function loaded(evt) {
+ var result = evt.target.result;
+ if (!result) {
+ FailTest("Fail to read file");
+ }
+ PassTest();
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsArrayBuffer value of FileReader interface set empty string will Normal execution " />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try {
+ reader.readAsArrayBuffer("");
+ PassTest();
+ } catch (e) {
+ FailTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_exception_InvalidStateError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsArrayBuffer throw an InvalidStateError exception when the readyState is LOADING" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var file = null;
+ function startRead() {
+ // obtain input element through DOM
+ file = document.getElementById('file').files[0];
+ if (file) {
+ read(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function read(readFile) {
+ var reader = new FileReader();
+ // Handle loadStart,success and errors
+ reader.onloadstart = loadStart;
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsArrayBuffer(readFile);
+ }
+
+ function loadStart(evt) {
+ var reader = evt.target;
+ if (reader && reader.readyState == reader.LOADING) {
+ try {
+ reader.readAsArrayBuffer(file);
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ if (ex.name == "InvalidStateError") {
+ PassTest();
+ } else {
+ FailTest("Throw exception but name is " + ex.name);
+ }
+ }
+ } else {
+ FailTest("The ready state is error");
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur a Progress event");
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsArrayBuffer is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 5000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.readAsArrayBuffer && fileReader.readAsArrayBuffer instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method FileReader.readAsArrayBuffer is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test:FileReader_readAsArrayBuffer_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsArrayBuffer value of FileReader interface is not Parameter" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsArrayBuffer();
+ FailTest();
+ } catch (e) {
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_occur_error</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsArrayBuffer occurs an error that expecting readyState is to be set DONE and result to be set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsArrayBuffer(readFile);
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ if (!reader) {
+ FailTest("The FileReader object is " + reader);
+ }
+ if (reader.readyState == reader.DONE) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The result is not null");
+ }
+ } else {
+ FailTest("The state is not FileReader.DONE");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>FileAPI Test:FileReader_readAsArrayBuffer_set_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsArrayBuffer value of FileReader interface set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try {
+ reader.readAsArrayBuffer(null);
+ } catch (ex) {
+ } finally {
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsBinaryString value of FileReader interface set blo" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try {
+ reader.readAsBinaryString(blo);
+ FailTest();
+ } catch(e){
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsBinaryString value of FileReader interface,when the readAsBinaryString(blob) method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload a file.</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange = "showFileList()" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsBinaryString(blob);
+ function loaded(evt) {
+ var result = evt.target.result;
+ if (!result) {
+ FailTest("Fail to read file");
+ }
+ PassTest();
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsBinaryString value of FileReader interface set empty string will Normal execution " />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsBinaryString("");
+ PassTest();
+ } catch(e){
+ FailTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_exception_InvalidStateError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsBinaryString throw an InvalidStateError exception when the readyState is LOADING" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var file = null;
+ function startRead() {
+ // obtain input element through DOM
+ file = document.getElementById('file').files[0];
+ if (file) {
+ read(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function read(readFile) {
+ var reader = new FileReader();
+ // Handle loadStart,success and errors
+ reader.onloadstart = loadStart;
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsBinaryString(readFile);
+ }
+
+ function loadStart(evt) {
+ var reader = evt.target;
+ if (reader && reader.readyState == reader.LOADING) {
+ try {
+ reader.readAsBinaryString(file);
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ if (ex.name == "InvalidStateError") {
+ PassTest();
+ } else {
+ FailTest("Throw exception but name is " + ex.name);
+ }
+ }
+ } else {
+ FailTest("The ready state is error");
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur a Progress event");
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsBinaryString is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.readAsBinaryString && fileReader.readAsBinaryString instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method FileReader.readAsBinaryString is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the method readAsBinaryString value of FileReader interface is not Parameter" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsArrayBuffer();
+ FailTest();
+ } catch (e) {
+ PassTest();
+ }
+ </script>
+
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_occur_error</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsBinaryString occurs an error that expecting readyState is to be set DONE and result to be set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsBinaryString(readFile);
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ if (!reader) {
+ FailTest("The FileReader object is " + reader);
+ }
+ if (reader.readyState == reader.DONE) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The result is not null");
+ }
+ } else {
+ FailTest("The state is not FileReader.DONE");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsBinaryString_set_blob_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsBinaryString value of FileReader interface set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try {
+ reader.readAsBinaryString(null);
+ } catch (ex) {
+ } finally {
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsDataURL value of FileReader interface set blo" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsDataURL(blo);
+ FailTest();
+ } catch(e){
+ PassTest();
+
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the method readAsDataURL value of FileReader interface,When the readAsDataURL(blob) method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload a file.</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsDataURL(blob);
+ function loaded(evt) {
+ var result = evt.target.result;
+ if (!result) {
+ FailTest("Fail to read file");
+ }
+ PassTest();
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsDataURL value of FileReader interface set empty string will Normal execution " />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsDataURL("");
+ PassTest();
+ } catch(e){
+ FailTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_exception_InvalidStateError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsDataURL throw an InvalidStateError exception when the readyState is LOADING" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var file = null;
+ function startRead() {
+ // obtain input element through DOM
+ file = document.getElementById('file').files[0];
+ if (file) {
+ read(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function read(readFile) {
+ var reader = new FileReader();
+ // Handle loadStart,success and errors
+ reader.onloadstart = loadStart;
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsDataURL(readFile);
+ }
+
+ function loadStart(evt) {
+ var reader = evt.target;
+ if (reader && reader.readyState == reader.LOADING) {
+ try {
+ reader.readAsDataURL(file);
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ if (ex.name == "InvalidStateError") {
+ PassTest();
+ } else {
+ FailTest("Throw exception but name is " + ex.name);
+ }
+ }
+ } else {
+ FailTest("The ready state is error");
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur a Progress event");
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsDataURL is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.readAsDataURL && fileReader.readAsDataURL instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method FileReader.readAsDataURL is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsDataURL of FileReader interface is not parameter" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsDataURL();
+ FailTest();
+ } catch(e){
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_occur_error</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsDataURL occurs an error that expecting readyState is to be set DONE and result to be set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ read(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function read(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory
+ reader.readAsDataURL(readFile);
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ if (!reader) {
+ FailTest("The FileReader object is " + reader);
+ }
+ if (reader.readyState == reader.DONE) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The result is not null");
+ }
+ } else {
+ FailTest("The state is not FileReader.DONE");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsDataURL_set_blob_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsDataURL value of FileReader interface set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsDataURL(null);
+ } catch(e){
+ } finally {
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_Blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface set blo" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsText(blo);
+ FailTest();
+ } catch(e){
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface, When the readAsText method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload a file.</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange = "showFileList()" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsText(blob);
+ function loaded(evt) {
+ var result = evt.target.result;
+ if (!result) {
+ FailTest("Fail to read file");
+ }
+ PassTest();
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_empty_string</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface set empty string will Normal execution " />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsText("");
+ PassTest();
+ } catch(e){
+ FailTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_exception_InvalidStateError</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsText throw an InvalidStateError exception when the readyState is LOADING" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var file = null;
+ function startRead() {
+ // obtain input element through DOM
+ file = document.getElementById('file').files[0];
+ if (file) {
+ read(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function read(readFile) {
+ var reader = new FileReader();
+ // Handle loadStart,success and errors
+ reader.onloadstart = loadStart;
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-8
+ reader.readAsText(readFile, "UTF-8");
+ }
+
+ function loadStart(evt) {
+ var reader = evt.target;
+ if (reader && reader.readyState == reader.LOADING) {
+ try {
+ reader.readAsText(file, "UTF-8");
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ if (ex.name == "InvalidStateError") {
+ PassTest();
+ } else {
+ FailTest("Throw exception but name is " + ex.name);
+ }
+ }
+ } else {
+ FailTest("The ready state is error");
+ }
+ }
+
+ function loaded(evt) {
+ FailTest("Not occur a Progress event");
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsText is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ } else {
+ if (fileReader.readAsText && fileReader.readAsText instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method FileReader.readAsText is not exist");
+ }
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_invalid_encoding</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsText has a invalid encoding parameter that expecting read file successfully" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as invalid encoding
+ reader.readAsText(readFile, "invalid_encoding");
+ }
+
+ function loaded(evt) {
+ var reader = evt.target;
+ if (reader && reader.result) {
+ PassTest();
+ } else {
+ FailTest("Fail to read the file as invalid encoding");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error when read the file");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface is not parameter" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsText();
+ FailTest();
+ } catch(e){
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsArrayBuffer_occur_error</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readAsText occurs an error that expecting readyState is to be set DONE and result to be set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-8
+ reader.readAsText(readFile, "UTF-8");
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ if (!reader) {
+ FailTest("The FileReader object is " + reader);
+ }
+ if (reader.readyState == reader.DONE) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The result is not null");
+ }
+ } else {
+ FailTest("The state is not FileReader.DONE");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_set_blob_null</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsText(null);
+ } catch(e){
+ } finally {
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_set_optional</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the method readAsText value of FileReader interface set null" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ var reader = new FileReader();
+ try{
+ reader.readAsText(null, "UTF-16");
+ } catch(e){
+ } finally {
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readAsText_when_call_set_optional</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readAsText value of FileReader interface,When the readAsText(blob, encoding) method is called" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload a file.</h3>
+ <input id="fileUplodad" type="file" multiple size="80" onchange = "showFileList()" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsText(blob, "UTF-16");
+ function loaded(evt) {
+ var result = evt.target.result;
+ if (!result) {
+ FailTest("Fail to read file");
+ }
+ PassTest();
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the method readyState in FileReader interface" />
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var reader = new FileReader();
+ test(function() {
+ assert_exists(reader, "readyState");
+ }, document.title);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_one</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute readyState value of FileReader interface,a File or Blob is being read" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.readAsArrayBuffer(blob);
+ reader.onprogress = updateProgress;
+ reader.onloaded = loaded;
+
+ function updateProgress(evt) {
+ var reader = evt.target;
+ if (!reader) {
+ FailTest("Fail to obtain FileReader object");
+ }
+ if (reader.readyState == 1) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ function loaded(evt) {
+ FailTest("Not trigger the Progress Event");
+ }
+ var readyState = reader.readyState;
+ if (readyState == 1) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readyState is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ var TEN = 10;
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ }
+ var iniValue = fileReader.readyState;
+ fileReader.readyState = iniValue + TEN;
+ if (fileReader.readyState == iniValue && fileReader.readyState != iniValue + TEN) {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.readyState is not readonly");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_two</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute readyState value of FileReader interface,the entire File or Blob has been read into memory" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsArrayBuffer(blob);
+ function loaded(evt) {
+ var reader = evt.target;
+ if (!reader) {
+ FailTest("Fail to obtain FileReader object");
+ }
+ if (reader.readyState == 2) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.readyState is of type number" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ }
+ if (typeof fileReader.readyState == "number") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.readyState is not of type number");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_readyState_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="To check the attribute readyState value of FileReader interface,the FileReader object has been constructed, and there are no pending reads" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ var readyState = reader.readyState;
+ if (readyState == 0) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_call_readAsArrayBuffer</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result return an ArrayBuffer [TypedArrays] object when the readAsArrayBuffer read method is called and no error in reading the File or Blob has occurred" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload file at least one</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsArrayBuffer(readFile);
+ }
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var arrayBuffer = evt.target.result;
+ if (arrayBuffer && arrayBuffer instanceof ArrayBuffer) {
+ PassTest();
+ } else {
+ FailTest("Fail to read the file as ArrayBuffer");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_call_readAsBinaryString</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result return a DOMString representing the File or Blob's data as a binary string when the readAsBinaryString read method is called and no error in reading the File or Blob has occurred" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsBinaryString(readFile);
+ }
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var binaryString = evt.target.result;
+ if (binaryString) {
+ PassTest();
+ } else {
+ FailTest("Fail to read the file as a binary string");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_call_readAsDataURL</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result return a DOMString that is a Data URL [DataURL] encoding of the File or Blob's data when the readAsDataURL read method is used" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange = "startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to got file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsDataURL(readFile);
+ }
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var dataUrl = evt.target.result;
+
+ //data:application/javascript;......
+ if (dataUrl.indexOf("data") != -1) {
+ PassTest();
+ } else {
+ FailTest("Return a DOMString that is not a Data URL");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_call_readAsText</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result return a string representing the File or Blob's data as a text string when the readAsText read method is called and no error in reading the File or Blob has occurred" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload file at least one</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to got file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsText(readFile);
+ }
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var text = evt.target.result;
+ // data:application/javascript;......
+ if (text) {
+ PassTest();
+ } else {
+ FailTest("Fail to read the file as text");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_default_value</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the default value of FileReader.result is null" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ try{
+ var reader = new FileReader();
+ t.step(function() {
+ assert_true(reader.result == null, "The value of result is not null");
+ }, "check the value of result if no read method has been called");
+ t.done();
+ } catch(e) {
+ t.step(function() {
+ assert_true(false, "Occur an exception" + e);
+ });
+ t.done();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title, {timeout: 10000});
+ var TEN = 10;
+ function RunTest() {
+ var fileReader = new FileReader();
+ if (!fileReader) {
+ FailTest("Fail to get FileReader object");
+ }
+ var iniValue = fileReader.result;
+ fileReader.result = iniValue + "result";
+ if (fileReader.result == iniValue && fileReader.result != iniValue + "result") {
+ PassTest();
+ } else {
+ FailTest("The constant FileReader.result is not readonly");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: FileReader_result_when_call_abort</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.abort is called when readyState is LOADING that expecting FileReader.result is to be set null" />
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80"/>
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+
+ var node = document.getElementById('fileUplodad');
+ node.onchange = t.step_func(function () {
+ var reader = new FileReader();
+ var blob = node.files[0];
+ reader.readAsText(blob);
+ // Handle progress event
+ reader.onprogress = t.step_func(function (e) {
+ if (reader.readyState == reader.LOADING) {
+ reader.abort();
+ reader.onabort = t.step_func(function () {
+ // If readyState = LOADING set readyState to DONE and result to null when the abort() method is called
+ assert_true(reader.result === null, "The value of result is " + reader.result);
+ t.done();
+ });
+ } else {
+ assert_unreached("read state error: " + reader.readyState);
+ t.done();
+ }
+ });
+ // handle error event
+ reader.onerror = t.step_func(function (e) {
+ assert_unreached("readAsText() error: " + e.target.error.name);
+ t.done();
+ });
+ });
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_when_occur_error</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if FileReader.result return null when an error in reading the File or Blob has occurred" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange = "startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var reader = null;
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to got file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The value of FileReader.result is not null");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_when_readyState_two</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute result value of FileReader interface,if the readAsDataURL read method is used, the result attribute MUST return a DOMString" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var reader = new FileReader();
+ var blob = document.getElementById("fileUplodad").files[0];
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ reader.readAsDataURL(blob);
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var fileString = evt.target.result;
+ if (reader.readyState == 2) {
+ if (fileString && typeof fileString === "string") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: FileReader_result_when_readyState_zero</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the value of result is null when the readState is EMPTY" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ try {
+ var reader = new FileReader();
+ if (reader.readyState == 0) {
+ if (reader.result == null) {
+ PassTest();
+ } else {
+ FailTest("The value of result is not null");
+ }
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ window.setTimeout(FailTest, 3000);
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_example_error_progress</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of handling progress conditions" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get the file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ FailTest("No error occurs");
+ }
+
+ function errorHandler(evt) {
+ PassTest();
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_example_handle_progress</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of handling progress conditions" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="startRead()" />
+ <p>1.Please upload file.<br>
+ 2.The test pass if the page shows 'Pass'.</p>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle progress and errors
+ reader.onprogress = updateProgress;
+ reader.onerror = errorHandler;
+ reader.onloaded = loaded;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function updateProgress(evt) {
+ if (evt.lengthComputable) {
+ // evt.loaded and evt.total are ProgressEvent properties
+ var loaded = (evt.loaded / evt.total);
+ if (loaded <= 1) {
+ PassTest();
+ } else {
+ FailTest("ProgressEvent properties have error value");
+ }
+ } else {
+ FailTest("The browser does not support ProgressEvent.lengthComputable");
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Occur an error when read the file" + evt);
+ }
+
+ function loaded(evt) {
+ FailTest("Not trigger the Progress Event");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_example_handle_progress</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of handling progress conditions" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange = "startRead()" /><br>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function startRead() {
+ // obtain input element through DOM
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ getAsText(file);
+ } else {
+ FailTest("fail to get the file object");
+ }
+ }
+
+ function getAsText(readFile) {
+ var reader = new FileReader();
+ // Handle success, and errors
+ reader.onload = loaded;
+ reader.onerror = errorHandler;
+ // Read file into memory as UTF-16
+ reader.readAsText(readFile, "UTF-16");
+ }
+
+ function loaded(evt) {
+ // Obtain the read file data
+ var fileString = evt.target.result;
+ if (fileString) {
+ PassTest();
+ } else {
+ FailTest("The file data is " + fileString);
+ }
+ }
+
+ function errorHandler(evt) {
+ FailTest("Fail to read file data");
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_inherits_blob</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-file" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the File interface inherits from Blob interface" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList) {
+ var file = fileList.item(0);
+ if (file && file instanceof File) {
+ if (file instanceof Blob) {
+ PassTest();
+ } else {
+ FailTest("File interface does not inherits from Blob interface");
+ }
+ } else {
+ FailTest("Fail to get a file object");
+ }
+ } else {
+ FailTest("Fail to get FileList object");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_lastModifiedDate_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-lastModifiedDate" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if File.lastModifiedDate is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList) {
+ var file = fileList.item(0);
+ if (file) {
+ t.step(function() {
+ assert_true("lastModifiedDate" in file, "The lastModifiedDate attribute is missing");
+ });
+ t.done();
+ } else {
+ FailTest("Fail to get File object");
+ }
+ } else {
+ FailTest("Fail to get FileList object");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_lastModifiedDate_is_Date</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute lastModifiedDate value of interface File is Date's instance" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var file=document.getElementById("fileUplodad").files[0];
+ var lastModifiedDate = file.lastModifiedDate;
+ if (lastModifiedDate != undefined && lastModifiedDate instanceof Date) {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_lastModifiedDate_normal</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute lastModifiedDate value of interface File return the last modified date" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ var showFileList = function () {
+ var file = document.getElementById('fileUplodad').files[0];
+ var lastModifiedDate = file.lastModifiedDate;
+ if (lastModifiedDate != undefined && typeof lastModifiedDate == "object") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_lastModifiedDate_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute lastModifiedDate value of interface File is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ try {
+ file=document.getElementById("fileUplodad").files[0];
+ var lastDate = file.lastModifiedDate;
+ file.lastModifiedDate = new Date();
+ if (file.lastModifiedDate.getTime() == lastDate.getTime()) {
+ PassTest();
+ } else {
+ FailTest("lastModifiedDate is not readonly");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_lastModifiedDate_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute lastModifiedDate value of interface File is object type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var file = document.getElementById("fileUplodad").files[0];
+ var lastDate = file.lastModifiedDate;
+ if (lastDate != undefined && typeof lastDate === "object") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_name_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-name" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if File.name is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var file = document.getElementById('file').files[0];
+ if (file) {
+ t.step(function() {
+ assert_true("name" in file, "the name attribute is missing");
+ });
+ t.done();
+ } else {
+ FailTest("Fail to get File object");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>File API Test: File_name_normal</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute name value of interface File return file name" />
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" /><br>
+ <p><strong>Test steps:</strong></p>
+ <p>
+ 1. Please upload a file;<br>
+ 2. Check the file name that is displayed on the page;<br>
+ 3. This test passes if the name of the file you uploaded is correct.
+ </p>
+ <div id="log"></div>
+ <script type="text/javascript">
+ function showFileList() {
+ var file = document.getElementById("fileUplodad").files[0];
+ document.getElementById('log').innerHTML = "<h4 style='color:green'>" + file.name + "</h4>";
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: File_name_readonly</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-name" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if File.name is readonly" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain a filelist object
+ var fileList = document.getElementById('file').files;
+ if (fileList) {
+ var file = fileList.item(0);
+ if (file) {
+ iniValue = file.name;
+ file.name = iniValue + "filename";
+ if (file.name == iniValue && file.name != iniValue + "filename") {
+ PassTest();
+ } else {
+ FailTest("The File.name is not readonly");
+ }
+ } else {
+ FailTest("Fail to get File object");
+ }
+ } else {
+ FailTest("Fail to get FileList object");
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+-->
+<html>
+ <head>
+ <title>File API Test: File_name_type</title>
+ <link rel="author" title="Intel" href="http://www.intel.com/" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if the attribute name value of interface File of the type is string type" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script type="text/javascript" src="../resources/testharness.js"></script>
+ <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <input id="fileUplodad" type="file" multiple size="80" onchange="showFileList()" />
+ <h3>Please upload a file.</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function showFileList() {
+ var file=document.getElementById("fileUplodad").files[0];
+ var fileName = file.name;
+ if (typeof fileName === "string") {
+ PassTest();
+ } else {
+ FailTest();
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# fileapi/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/webapi-w3c-fileapi-tests
+pkgincludedir = $(includedir)/webapi-w3c-fileapi-tests
+pkglibdir = $(libdir)/webapi-w3c-fileapi-tests
+pkglibexecdir = $(libexecdir)/webapi-w3c-fileapi-tests
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = fileapi
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(fileapidir)"
+SCRIPTS = $(fileapi_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run tar
+AUTOCONF = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run automake-1.11
+AWK = gawk
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_TARNAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_VERSION=\"2.1.8\" -DPACKAGE_STRING=\"webapi-w3c-fileapi-tests\ 2.1.8\" -DPACKAGE_BUGREPORT=\"zhiqiang.zhang@intel.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"webapi-w3c-fileapi-tests\" -DVERSION=\"2.1.8\"
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+PACKAGE = webapi-w3c-fileapi-tests
+PACKAGE_BUGREPORT = zhiqiang.zhang@intel.com
+PACKAGE_NAME = webapi-w3c-fileapi-tests
+PACKAGE_STRING = webapi-w3c-fileapi-tests 2.1.8
+PACKAGE_TARNAME = webapi-w3c-fileapi-tests
+PACKAGE_URL =
+PACKAGE_VERSION = 2.1.8
+PATH_SEPARATOR = :
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+VERSION = 2.1.8
+abs_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/fileapi
+abs_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/fileapi
+abs_top_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+abs_top_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+am__leading_dot = .
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+SUBDIRS = support
+fileapi_SCRIPTS = *
+fileapidir = /opt/webapi-w3c-fileapi-tests/fileapi
+EXTRA_DIST = $(fileapi_SCRIPTS)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fileapi/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fileapi/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-fileapiSCRIPTS: $(fileapi_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(fileapidir)" || $(MKDIR_P) "$(DESTDIR)$(fileapidir)"
+ @list='$(fileapi_SCRIPTS)'; test -n "$(fileapidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(fileapidir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(fileapidir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-fileapiSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(fileapi_SCRIPTS)'; test -n "$(fileapidir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(fileapidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(fileapidir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(fileapidir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-fileapiSCRIPTS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-fileapiSCRIPTS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic ctags \
+ ctags-recursive distclean distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am \
+ install-fileapiSCRIPTS install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-fileapiSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+SUBDIRS = support
+fileapi_SCRIPTS = *
+fileapidir = /opt/webapi-w3c-fileapi-tests/fileapi
+EXTRA_DIST = $(fileapi_SCRIPTS)
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = fileapi
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(fileapidir)"
+SCRIPTS = $(fileapi_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = support
+fileapi_SCRIPTS = *
+fileapidir = /opt/webapi-w3c-fileapi-tests/fileapi
+EXTRA_DIST = $(fileapi_SCRIPTS)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fileapi/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fileapi/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-fileapiSCRIPTS: $(fileapi_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(fileapidir)" || $(MKDIR_P) "$(DESTDIR)$(fileapidir)"
+ @list='$(fileapi_SCRIPTS)'; test -n "$(fileapidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(fileapidir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(fileapidir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-fileapiSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(fileapi_SCRIPTS)'; test -n "$(fileapidir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(fileapidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(fileapidir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(fileapidir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-fileapiSCRIPTS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-fileapiSCRIPTS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic ctags \
+ ctags-recursive distclean distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am \
+ install-fileapiSCRIPTS install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-fileapiSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_createObjectURL_base</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.createObjectURL has a valid argument that expecting a unique Blob URI is to be returned" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload files</h3>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" />
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ try {
+ // obtain a filelist object
+ var blob = document.getElementById('file').files[0];
+ if (!blob) {
+ FailTest("Fail to get Blob object");
+ } else {
+ window.URL = window.URL || window.webkitURL;
+ if (window.URL) {
+ var uri = window.URL.createObjectURL(blob);
+ //The uri schemal: blob:......
+ if (uri && uri.indexOf('blob:') != -1) {
+ PassTest();
+ } else {
+ FailTest("Fail to obtain a unique Blob URI");
+ }
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex);
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_createObjectURL_blob_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.createObjectURL returns null when this method is called with a Blob argument that is NOT valid" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ try {
+ if (window.URL) {
+ var blobURLref = window.URL.createObjectURL(null);
+ if (blobURLref == null) {
+ PassTest();
+ } else {
+ FailTest("Fail to obtain a reference to a Blob object");
+ }
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ } catch (ex) {
+ FailTest("Throw an exception " + ex.name);
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_createObjectURL_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.createObjectURL is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ if (window.URL) {
+ if (window.URL.createObjectURL && window.URL.createObjectURL instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method URL.createObjectURL is not exist");
+ }
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_createObjectURL_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.createObjectURL has no argument that expecting a exception is to be thrown" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ try {
+ if (window.URL) {
+ window.URL.createObjectURL();
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ PassTest();
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_example_obtain_blob_object</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#URL-object" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if example of obtaining a reference to a Blob object" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload files</h3>
+ <input id="file" type="file" multiple size="80" onchange="RunTest();" /><br>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ setup({timeout : 3600000});
+ function RunTest() {
+ // obtain a filelist object
+ var file = document.getElementById('file').files.item(0);
+ if (!file) {
+ FailTest("Fail to get Blob object");
+ } else {
+ if (window.URL) {
+ var blobURLref = window.URL.createObjectURL(file);
+ if (blobURLref && blobURLref.indexOf("blob:") != -1) {
+ PassTest();
+ } else {
+ FailTest("Fail to obtain a reference to a Blob object");
+ }
+ } else if (window.webkitURL) {
+ var blobURLref = window.webkitURL.createObjectURL(file);
+ if (blobURLref && blobURLref.indexOf("blob:") != -1) {
+ PassTest();
+ } else {
+ FailTest("Fail to obtain a reference to a Blob object");
+ }
+ }
+ }
+ }
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_in_webworker</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#URL-object" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if WorkerUtils implements URL" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+
+ function RunTest() {
+ try {
+ var worker = new Worker("./URL_in_webworker.js");
+ worker.onmessage = function (event) {
+ if (event.data == "PASS")
+ PassTest();
+ else
+ FailTest(event.data);
+ };
+ } catch (ex) {
+ FailTest("{Exception code: " + ex.code + "}");
+ }
+ }
+
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+ if (self.URL || self.webkitURL) {
+ postMessage("PASS");
+ } else {
+ postMessage("WorkerUtils does not implement URL");
+ }
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_revokeObjectURL_exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.revokeObjectURL is exist" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ if (window.URL) {
+ if (window.URL.revokeObjectURL && window.URL.revokeObjectURL instanceof Function) {
+ PassTest();
+ } else {
+ FailTest("The method URL.revokeObjectURL is not exist");
+ }
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_revokeObjectURL_no_argument</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.revokeObjectURL has no argument that expecting a exception is to be thrown" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ try {
+ if (window.URL) {
+ window.URL.revokeObjectURL();
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ FailTest("No exception be thrown");
+ } catch (ex) {
+ PassTest();
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>File API Test: URL_revokeObjectURL_url_invalid</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check if URL.revokeObjectURL call does nothing and user agents MAY display a message on the error console when the url refers to a Blob that is NOT valid" />
+ <script type="text/javascript" src="filesupport.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h3>Please upload files</h3>
+ <div id="log"></div>
+ <script type="text/javascript">
+ var t = async_test(document.title);
+ function RunTest() {
+ window.URL = window.URL || window.webkitURL;
+ try {
+ if (window.URL) {
+ window.URL.revokeObjectURL(NaN);
+ } else {
+ FailTest("The browser does not support URL interface");
+ }
+ PassTest();
+ } catch (ex) {
+ FailTest("Thrown an exception");
+ }
+ }
+ RunTest();
+ </script>
+ </body>
+</html>
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Kaiyu <kaiyux.li@intel.com>
+ Jin,Weihu <weihux.jin@intel.com>
+*/
+ try {
+ var readerSync = new FileReaderSync();
+ self.BlobBuilder = self.BlobBuilder || self.MozBlobBuilder || self.WebKitBlobBuilder || self.MSBlobBuilder;
+ var bb = new BlobBuilder();
+ onmessage = function(event) {
+ if(event.data == "fileReaderSync"){
+ postMessage(readerSync.toString());
+ } else if(event.data == "fileReaderSync_readAsText"){
+ bb.append("fileReaderSync readAsText is OK");
+ blob = bb.getBlob('text/plain');
+ var text = readerSync.readAsText(blob);
+ postMessage(text);
+ } else if(event.data == "fileReaderSync_readAsBinaryString"){
+ bb.append("fileReaderSync readAsBinaryString is OK");
+ blob = bb.getBlob('text/plain');
+ var text = readerSync.readAsBinaryString(blob);
+ postMessage(text);
+ } else if(event.data == "fileReaderSync_readAsDataURL"){
+ bb.append("fileReaderSync readAsDataURL is OK");
+ blob = bb.getBlob('text/plain');
+ var text = readerSync.readAsDataURL(blob);
+ postMessage(text);
+ } else if(event.data == "fileReaderSync_readAsArrayBuffer"){
+ bb.append("fileReaderSync readAsArrayBuffer is OK");
+ blob = bb.getBlob('text/plain');
+ var text = readerSync.readAsArrayBuffer(blob);
+ postMessage(text.toString());
+ } else
+ postMessage("There is a wrong");
+ }
+ } catch (ex) {
+ postMessage("Throw an exception " + ex);
+ }
--- /dev/null
+/*
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Fan,Weiwei <weiwix.fan@intel.com>
+
+*/
+
+ var blockbuilder;
+ function initBlobBuilder() {
+ if (!blockbuilder) {
+ try {
+ blockbuilder = new MSBlobBuilder();
+ } catch (e) {}
+
+ try {
+ blockbuilder = new WebKitBlobBuilder();
+ } catch (e) {}
+
+ try {
+ blockbuilder = new MozBlobBuilder();
+ } catch (e) {}
+ }
+ return blockbuilder;
+ }
+
+ function PassTest(desc) {
+ t.step(function() { assert_true(true, desc); } );
+ t.done();
+ }
+
+ function FailTest(desc) {
+ t.step(function() { assert_true(false, desc); } );
+ t.done();
+ }
+
+ function ExistTest(obj, propertyName, desc) {
+ t.step(function() {
+ assert_exists(obj, propertyName, desc);
+ });
+ t.done();
+ }
+ function testLog(pass, desc) {
+ var span = document.createElement("span");
+ span.style.cssText = "display:inline-block; width:80px; text-align:center;"
+ if (pass) {
+ span.style["color"] = "green";
+ span.innerHTML = "Pass";
+ }
+ else {
+ span.style["color"] = "red";
+ span.innerHTML = "Fail";
+ }
+ var spandesc = document.createElement("span");
+ spandesc.style.cssText = "padding-left:20px;"
+ spandesc.innerHTML = desc;
+ document.getElementById("log").appendChild(span);
+ document.getElementById("log").appendChild(spandesc);
+ document.getElementById("log").style.cssText = "height:45px; line-height:45px; border:#000 solid; border-width:3px 0 1px 0; font-weight:bold;";
+ }
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# fileapi/support/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/webapi-w3c-fileapi-tests
+pkgincludedir = $(includedir)/webapi-w3c-fileapi-tests
+pkglibdir = $(libdir)/webapi-w3c-fileapi-tests
+pkglibexecdir = $(libexecdir)/webapi-w3c-fileapi-tests
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = fileapi/support
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(audiosupportdir)"
+SCRIPTS = $(audiosupport_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run tar
+AUTOCONF = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run automake-1.11
+AWK = gawk
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_TARNAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_VERSION=\"2.1.8\" -DPACKAGE_STRING=\"webapi-w3c-fileapi-tests\ 2.1.8\" -DPACKAGE_BUGREPORT=\"zhiqiang.zhang@intel.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"webapi-w3c-fileapi-tests\" -DVERSION=\"2.1.8\"
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+PACKAGE = webapi-w3c-fileapi-tests
+PACKAGE_BUGREPORT = zhiqiang.zhang@intel.com
+PACKAGE_NAME = webapi-w3c-fileapi-tests
+PACKAGE_STRING = webapi-w3c-fileapi-tests 2.1.8
+PACKAGE_TARNAME = webapi-w3c-fileapi-tests
+PACKAGE_URL =
+PACKAGE_VERSION = 2.1.8
+PATH_SEPARATOR = :
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+VERSION = 2.1.8
+abs_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/fileapi/support
+abs_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/fileapi/support
+abs_top_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+abs_top_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+am__leading_dot = .
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+audiosupport_SCRIPTS = *
+audiosupportdir = /opt/webapi-w3c-fileapi-tests/fileapi/support
+EXTRA_DIST = $(audiosupport_SCRIPTS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fileapi/support/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fileapi/support/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-audiosupportSCRIPTS: $(audiosupport_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(audiosupportdir)" || $(MKDIR_P) "$(DESTDIR)$(audiosupportdir)"
+ @list='$(audiosupport_SCRIPTS)'; test -n "$(audiosupportdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(audiosupportdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(audiosupportdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-audiosupportSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(audiosupport_SCRIPTS)'; test -n "$(audiosupportdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(audiosupportdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(audiosupportdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(audiosupportdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-audiosupportSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-audiosupportSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-audiosupportSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-audiosupportSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+audiosupport_SCRIPTS = *
+audiosupportdir = /opt/webapi-w3c-fileapi-tests/fileapi/support
+EXTRA_DIST = $(audiosupport_SCRIPTS)
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = fileapi/support
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(audiosupportdir)"
+SCRIPTS = $(audiosupport_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+audiosupport_SCRIPTS = *
+audiosupportdir = /opt/webapi-w3c-fileapi-tests/fileapi/support
+EXTRA_DIST = $(audiosupport_SCRIPTS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fileapi/support/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fileapi/support/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-audiosupportSCRIPTS: $(audiosupport_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(audiosupportdir)" || $(MKDIR_P) "$(DESTDIR)$(audiosupportdir)"
+ @list='$(audiosupport_SCRIPTS)'; test -n "$(audiosupportdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(audiosupportdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(audiosupportdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-audiosupportSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(audiosupport_SCRIPTS)'; test -n "$(audiosupportdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(audiosupportdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(audiosupportdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(audiosupportdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-audiosupportSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-audiosupportSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-audiosupportSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-audiosupportSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+/*
+ Copyright (c) 2012 Intel Corporation.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Authors:
+ Jin,Weihu <weihux.jin@intel.com>
+
+*/
+
+var fileReaderSync = new FileReaderSync();
+self.onmessage = function (event) {
+ self.postMessage(fileReaderSync.toString());
+};
--- /dev/null
+All test files under this folder except COPYING, Makefile.am and blacklist.* come from
+https://github.com/w3c/testharness.js (commit 81649066b179216eed02dfb58f631eb8bb6c7629)
+without any modification besides the necessary adjustment on reference path to test harness
+
+These tests are copyright by W3C and/or the author listed in the test
+file. The tests are dual-licensed under the W3C Test Suite License:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+and the BSD 3-clause License:
+http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+under W3C's test suite licensing policy:
+http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
+
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# resources/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/webapi-w3c-fileapi-tests
+pkgincludedir = $(includedir)/webapi-w3c-fileapi-tests
+pkglibdir = $(libdir)/webapi-w3c-fileapi-tests
+pkglibexecdir = $(libexecdir)/webapi-w3c-fileapi-tests
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = resources
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(w3cresourcesdir)"
+SCRIPTS = $(w3cresources_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run tar
+AUTOCONF = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run automake-1.11
+AWK = gawk
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_TARNAME=\"webapi-w3c-fileapi-tests\" -DPACKAGE_VERSION=\"2.1.8\" -DPACKAGE_STRING=\"webapi-w3c-fileapi-tests\ 2.1.8\" -DPACKAGE_BUGREPORT=\"zhiqiang.zhang@intel.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"webapi-w3c-fileapi-tests\" -DVERSION=\"2.1.8\"
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+PACKAGE = webapi-w3c-fileapi-tests
+PACKAGE_BUGREPORT = zhiqiang.zhang@intel.com
+PACKAGE_NAME = webapi-w3c-fileapi-tests
+PACKAGE_STRING = webapi-w3c-fileapi-tests 2.1.8
+PACKAGE_TARNAME = webapi-w3c-fileapi-tests
+PACKAGE_URL =
+PACKAGE_VERSION = 2.1.8
+PATH_SEPARATOR = :
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+VERSION = 2.1.8
+abs_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/resources
+abs_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/resources
+abs_top_builddir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+abs_top_srcdir = /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests
+am__leading_dot = .
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/abuild/rpmbuild/BUILD/webapi-2.1.8/webapi-w3c-fileapi-tests/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+w3cresources_SCRIPTS = *
+w3cresourcesdir = /opt/webapi-w3c-fileapi-tests/resources
+EXTRA_DIST = $(w3cresources_SCRIPTS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign resources/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign resources/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-w3cresourcesSCRIPTS: $(w3cresources_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(w3cresourcesdir)" || $(MKDIR_P) "$(DESTDIR)$(w3cresourcesdir)"
+ @list='$(w3cresources_SCRIPTS)'; test -n "$(w3cresourcesdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(w3cresourcesdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(w3cresourcesdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-w3cresourcesSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(w3cresources_SCRIPTS)'; test -n "$(w3cresourcesdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(w3cresourcesdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(w3cresourcesdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(w3cresourcesdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-w3cresourcesSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-w3cresourcesSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip install-w3cresourcesSCRIPTS installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-w3cresourcesSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+w3cresources_SCRIPTS = *
+w3cresourcesdir = /opt/webapi-w3c-fileapi-tests/resources
+EXTRA_DIST = $(w3cresources_SCRIPTS)
--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = resources
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(w3cresourcesdir)"
+SCRIPTS = $(w3cresources_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+w3cresources_SCRIPTS = *
+w3cresourcesdir = /opt/webapi-w3c-fileapi-tests/resources
+EXTRA_DIST = $(w3cresources_SCRIPTS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign resources/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign resources/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-w3cresourcesSCRIPTS: $(w3cresources_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(w3cresourcesdir)" || $(MKDIR_P) "$(DESTDIR)$(w3cresourcesdir)"
+ @list='$(w3cresources_SCRIPTS)'; test -n "$(w3cresourcesdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(w3cresourcesdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(w3cresourcesdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-w3cresourcesSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(w3cresources_SCRIPTS)'; test -n "$(w3cresourcesdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(w3cresourcesdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(w3cresourcesdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(w3cresourcesdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-w3cresourcesSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-w3cresourcesSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip install-w3cresourcesSCRIPTS installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-w3cresourcesSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+/* Clamshell does not support methods, the list format: interface.method */
+
+var not_support_list = [
+ "Application.launch",
+ "Application.kill",
+ "Application.exit",
+ "Application.launchService",
+ "Application.getApplicationService",
+ "Application.getCurrentApplicationContext",
+ "Application.getApplicationsInformation",
+ "Application.addApplicationInformationEventListener",
+ "Application.removeApplicationInformationEventListener",
+
+ /* Bluetooth */
+ "BluetoothManager.getDefaultAdapter",
+ "BluetoothAdapter.setName",
+ "BluetoothAdapter.setPowered",
+ "BluetoothAdapter.setVisible",
+ "BluetoothAdapter.discoverDevices",
+ "BluetoothAdapter.stopDiscovery",
+ "BluetoothAdapter.getKnownDevices",
+ "BluetoothAdapter.getDevice",
+ "BluetoothAdapter.createBonding",
+ "BluetoothAdapter.destroyBonding",
+ "BluetoothAdapter.registerRFCOMMServiceByUUID",
+ "BluetoothDevice.connectToServiceByUUID",
+ "BluetoothServiceHandler.unregister",
+
+ /* Time */
+ "TimeUtil.getCurrentDateTime",
+ "TimeUtil.setCurrentDateTime",
+ "TimeUtil.getLocalTimezone",
+ "TimeUtil.getAvailableTimezones",
+ "TimeUtil.getDateFormat",
+ "TimeUtil.getTimeFormat",
+ "TimeUtil.isLeapYear",
+ "TZDate.getTimezoneAbbreviation",
+ "TZDate.secondsFromUTC",
+ "TZDate.isDST",
+ "TZDate.getPreviousDSTTransition",
+ "TZDate.getNextDSTTransition",
+
+ /* Call */
+ "CallHistory.Find",
+ "CallHistory.Remove",
+ "CallHistory.removeBatch",
+ "CallHistory.removeAll",
+ "CallHistory.deleteRecording",
+ "CallHistory.addListener",
+ "CallHistory.removeListener",
+
+ /* Calendar */
+ "CalendarManager.getCalendars",
+ "Calendar.add",
+ "Calendar.addBatch",
+ "Calendar.update",
+ "Calendar.updateBatch",
+ "Calendar.remove",
+ "Calendar.removeBatch",
+ "Calendar.find",
+ "Calendar.addChangeListener",
+ "Calendar.removeChangeListener",
+ "CalendarEvent.expandRecurrence",
+
+ /* Contact */
+ "AddressBook.Add",
+ "AddressBook.addBatch",
+ "AddressBook.update",
+ "AddressBook.updateBatch",
+ "AddressBook.remove",
+ "AddressBook.removeBatch",
+ "AddressBook.find",
+ "AddressBook.addChangeListener",
+ "Contact.convertToString",
+
+ /* Filesystem */
+ "FileSystemManager.Resolve",
+ "FileSystemManager.getStorage",
+ "FileSystemManager.listStorages",
+ "FileSystemManager.addStorageStateChangeListener",
+ "File.toURI",
+ "File.listFiles",
+ "File.openStream",
+ "File.readAsText",
+ "File.copyTo",
+ "File.moveTo",
+ "File.deleteDirectory",
+ "File.deleteFile",
+
+ /* Messaging */
+ "MessageService.sendMessage",
+ "MessageStorage.addDraftMessage",
+ "MessageStorage.findMessages",
+ "MessageStorage.removeMessages",
+ "MessageStorage.updateMessages",
+ "MessageStorage.findConversations",
+ "MessageStorage.removeConversations",
+ "MessageStorage.findFolders",
+ "MessageStorage.addMessagesChangeListener",
+ "MessageStorage.addConversationsChangeListener",
+ "MessageStorage.addFoldersChangeListener",
+ "MessageStorage.removeChangeListener",
+
+ /* POI */
+ "POIProvider.remove",
+
+ /* Media-Capture */
+ "capture",
+
+ /* Vibration */
+ "Vibration"
+];
+
--- /dev/null
+/* default blacklist.js, just a placeholder: interface.method */
+
+var not_support_list = [
+];
+
--- /dev/null
+/* default blacklist.js, just a placeholder: interface.method */
+
+var not_support_list = [
+];
+
--- /dev/null
+html {
+ font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
+}
+
+#log .warning,
+#log .warning a {
+ color: black;
+ background: yellow;
+}
+
+#log .error,
+#log .error a {
+ color: white;
+ background: red;
+}
+
+#log pre {
+ border: 1px solid black;
+ padding: 1em;
+}
+
+section#summary {
+ margin-bottom:1em;
+}
+
+table#results {
+ border-collapse:collapse;
+ table-layout:fixed;
+ width:100%;
+}
+
+table#results th:first-child,
+table#results td:first-child {
+ width:4em;
+}
+
+table#results th:last-child,
+table#results td:last-child {
+ width:50%;
+}
+
+table#results.assertions th:last-child,
+table#results.assertions td:last-child {
+ width:35%;
+}
+
+table#results th {
+ padding:0;
+ padding-bottom:0.5em;
+ border-bottom:medium solid black;
+}
+
+table#results td {
+ padding:1em;
+ padding-bottom:0.5em;
+ border-bottom:thin solid black;
+}
+
+tr.pass > td:first-child {
+ color:green;
+}
+
+tr.fail > td:first-child {
+ color:red;
+}
+
+tr.timeout > td:first-child {
+ color:red;
+}
+
+tr.notrun > td:first-child {
+ color:blue;
+}
+
+.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
+ font-variant:small-caps;
+}
+
+table#results span {
+ display:block;
+}
+
+table#results span.expected {
+ font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+ white-space:pre;
+}
+
+table#results span.actual {
+ font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+ white-space:pre;
+}
+
--- /dev/null
+/*
+Distributed under both the W3C Test Suite License [1] and the W3C
+3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
+policies and contribution forms [3].
+
+[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
+[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
+[3] http://www.w3.org/2004/10/27-testcases
+*/
+
+/*
+ * == Introduction ==
+ *
+ * This file provides a framework for writing testcases. It is intended to
+ * provide a convenient API for making common assertions, and to work both
+ * for testing synchronous and asynchronous DOM features in a way that
+ * promotes clear, robust, tests.
+ *
+ * == Basic Usage ==
+ *
+ * To use this file, import the script and the testharnessreport script into
+ * the test document:
+ * <script src="/resources/testharness.js"></script>
+ * <script src="/resources/testharnessreport.js"></script>
+ *
+ * Within each file one may define one or more tests. Each test is atomic
+ * in the sense that a single test has a single result (pass/fail/timeout).
+ * Within each test one may have a number of asserts. The test fails at the
+ * first failing assert, and the remainder of the test is (typically) not run.
+ *
+ * If the file containing the tests is a HTML file with an element of id "log"
+ * this will be populated with a table containing the test results after all
+ * the tests have run.
+ *
+ * NOTE: By default tests must be created before the load event fires. For ways
+ * to create tests after the load event, see "Determining when all tests
+ * are complete", below
+ *
+ * == Synchronous Tests ==
+ *
+ * To create a synchronous test use the test() function:
+ *
+ * test(test_function, name, properties)
+ *
+ * test_function is a function that contains the code to test. For example a
+ * trivial passing test would be:
+ *
+ * test(function() {assert_true(true)}, "assert_true with true")
+ *
+ * The function passed in is run in the test() call.
+ *
+ * properties is an object that overrides default test properties. The
+ * recognised properties are:
+ * timeout - the test timeout in ms
+ *
+ * e.g.
+ * test(test_function, "Sample test", {timeout:1000})
+ *
+ * would run test_function with a timeout of 1s.
+ *
+ * Additionally, test-specific metadata can be passed in the properties. These
+ * are used when the individual test has different metadata from that stored
+ * in the <head>.
+ * The recognized metadata properties are:
+ *
+ * help - The url of the part of the specification being tested
+ *
+ * assert - A human readable description of what the test is attempting
+ * to prove
+ *
+ * author - Name and contact information for the author of the test in the
+ * format: "Name <email_addr>" or "Name http://contact/url"
+ *
+ * == Asynchronous Tests ==
+ *
+ * Testing asynchronous features is somewhat more complex since the result of
+ * a test may depend on one or more events or other callbacks. The API provided
+ * for testing these features is indended to be rather low-level but hopefully
+ * applicable to many situations.
+ *
+ * To create a test, one starts by getting a Test object using async_test:
+ *
+ * async_test(name, properties)
+ *
+ * e.g.
+ * var t = async_test("Simple async test")
+ *
+ * Assertions can be added to the test by calling the step method of the test
+ * object with a function containing the test assertions:
+ *
+ * t.step(function() {assert_true(true)});
+ *
+ * When all the steps are complete, the done() method must be called:
+ *
+ * t.done();
+ *
+ * As a convenience, async_test can also takes a function as first argument.
+ * This function is called with the test object as both its `this` object and
+ * first argument. The above example can be rewritten as:
+ *
+ * async_test(function(t) {
+ * object.some_event = function() {
+ * t.step(function (){assert_true(true); t.done();});
+ * };
+ * }, "Simple async test");
+ *
+ * which avoids cluttering the global scope with references to async
+ * tests instances.
+ *
+ * The properties argument is identical to that for test().
+ *
+ * In many cases it is convenient to run a step in response to an event or a
+ * callback. A convenient method of doing this is through the step_func method
+ * which returns a function that, when called runs a test step. For example
+ *
+ * object.some_event = t.step_func(function(e) {assert_true(e.a)});
+ *
+ * == Making assertions ==
+ *
+ * Functions for making assertions start assert_
+ * The best way to get a list is to look in this file for functions names
+ * matching that pattern. The general signature is
+ *
+ * assert_something(actual, expected, description)
+ *
+ * although not all assertions precisely match this pattern e.g. assert_true
+ * only takes actual and description as arguments.
+ *
+ * The description parameter is used to present more useful error messages when
+ * a test fails
+ *
+ * NOTE: All asserts must be located in a test() or a step of an async_test().
+ * asserts outside these places won't be detected correctly by the harness
+ * and may cause a file to stop testing.
+ *
+ * == Setup ==
+ *
+ * Sometimes tests require non-trivial setup that may fail. For this purpose
+ * there is a setup() function, that may be called with one or two arguments.
+ * The two argument version is:
+ *
+ * setup(func, properties)
+ *
+ * The one argument versions may omit either argument.
+ * func is a function to be run synchronously. setup() becomes a no-op once
+ * any tests have returned results. Properties are global properties of the test
+ * harness. Currently recognised properties are:
+ *
+ * timeout - The time in ms after which the harness should stop waiting for
+ * tests to complete (this is different to the per-test timeout
+ * because async tests do not start their timer until .step is called)
+ *
+ * explicit_done - Wait for an explicit call to done() before declaring all
+ * tests complete (see below)
+ *
+ * output_document - The document to which results should be logged. By default
+ * this is the current document but could be an ancestor
+ * document in some cases e.g. a SVG test loaded in an HTML
+ * wrapper
+ *
+ * explicit_timeout - disable file timeout; only stop waiting for results
+ * when the timeout() function is called (typically for
+ * use when integrating with some existing test framework
+ * that has its own timeout mechanism).
+ *
+ * == Determining when all tests are complete ==
+ *
+ * By default the test harness will assume there are no more results to come
+ * when:
+ * 1) There are no Test objects that have been created but not completed
+ * 2) The load event on the document has fired
+ *
+ * This behaviour can be overridden by setting the explicit_done property to
+ * true in a call to setup(). If explicit_done is true, the test harness will
+ * not assume it is done until the global done() function is called. Once done()
+ * is called, the two conditions above apply like normal.
+ *
+ * == Generating tests ==
+ *
+ * NOTE: this functionality may be removed
+ *
+ * There are scenarios in which is is desirable to create a large number of
+ * (synchronous) tests that are internally similar but vary in the parameters
+ * used. To make this easier, the generate_tests function allows a single
+ * function to be called with each set of parameters in a list:
+ *
+ * generate_tests(test_function, parameter_lists, properties)
+ *
+ * For example:
+ *
+ * generate_tests(assert_equals, [
+ * ["Sum one and one", 1+1, 2],
+ * ["Sum one and zero", 1+0, 1]
+ * ])
+ *
+ * Is equivalent to:
+ *
+ * test(function() {assert_equals(1+1, 2)}, "Sum one and one")
+ * test(function() {assert_equals(1+0, 1)}, "Sum one and zero")
+ *
+ * Note that the first item in each parameter list corresponds to the name of
+ * the test.
+ *
+ * The properties argument is identical to that for test(). This may be a
+ * single object (used for all generated tests) or an array.
+ *
+ * == Callback API ==
+ *
+ * The framework provides callbacks corresponding to 3 events:
+ *
+ * start - happens when the first Test is created
+ * result - happens when a test result is recieved
+ * complete - happens when all results are recieved
+ *
+ * The page defining the tests may add callbacks for these events by calling
+ * the following methods:
+ *
+ * add_start_callback(callback) - callback called with no arguments
+ * add_result_callback(callback) - callback called with a test argument
+ * add_completion_callback(callback) - callback called with an array of tests
+ * and an status object
+ *
+ * tests have the following properties:
+ * status: A status code. This can be compared to the PASS, FAIL, TIMEOUT and
+ * NOTRUN properties on the test object
+ * message: A message indicating the reason for failure. In the future this
+ * will always be a string
+ *
+ * The status object gives the overall status of the harness. It has the
+ * following properties:
+ * status: Can be compared to the OK, ERROR and TIMEOUT properties
+ * message: An error message set when the status is ERROR
+ *
+ * == External API ==
+ *
+ * In order to collect the results of multiple pages containing tests, the test
+ * harness will, when loaded in a nested browsing context, attempt to call
+ * certain functions in each ancestor and opener browsing context:
+ *
+ * start - start_callback
+ * result - result_callback
+ * complete - completion_callback
+ *
+ * These are given the same arguments as the corresponding internal callbacks
+ * described above.
+ *
+ * == External API through cross-document messaging ==
+ *
+ * Where supported, the test harness will also send messages using
+ * cross-document messaging to each ancestor and opener browsing context. Since
+ * it uses the wildcard keyword (*), cross-origin communication is enabled and
+ * script on different origins can collect the results.
+ *
+ * This API follows similar conventions as those described above only slightly
+ * modified to accommodate message event API. Each message is sent by the harness
+ * is passed a single vanilla object, available as the `data` property of the
+ * event object. These objects are structures as follows:
+ *
+ * start - { type: "start" }
+ * result - { type: "result", test: Test }
+ * complete - { type: "complete", tests: [Test, ...], status: TestsStatus }
+ *
+ * == List of assertions ==
+ *
+ * assert_true(actual, description)
+ * asserts that /actual/ is strictly true
+ *
+ * assert_false(actual, description)
+ * asserts that /actual/ is strictly false
+ *
+ * assert_equals(actual, expected, description)
+ * asserts that /actual/ is the same value as /expected/
+ *
+ * assert_not_equals(actual, expected, description)
+ * asserts that /actual/ is a different value to /expected/. Yes, this means
+ * that "expected" is a misnomer
+ *
+ * assert_in_array(actual, expected, description)
+ * asserts that /expected/ is an Array, and /actual/ is equal to one of the
+ * members -- expected.indexOf(actual) != -1
+ *
+ * assert_array_equals(actual, expected, description)
+ * asserts that /actual/ and /expected/ have the same length and the value of
+ * each indexed property in /actual/ is the strictly equal to the corresponding
+ * property value in /expected/
+ *
+ * assert_approx_equals(actual, expected, epsilon, description)
+ * asserts that /actual/ is a number within +/- /epsilon/ of /expected/
+ *
+ * assert_less_than(actual, expected, description)
+ * asserts that /actual/ is a number less than /expected/
+ *
+ * assert_greater_than(actual, expected, description)
+ * asserts that /actual/ is a number greater than /expected/
+ *
+ * assert_less_than_equal(actual, expected, description)
+ * asserts that /actual/ is a number less than or equal to /expected/
+ *
+ * assert_greater_than_equal(actual, expected, description)
+ * asserts that /actual/ is a number greater than or equal to /expected/
+ *
+ * assert_regexp_match(actual, expected, description)
+ * asserts that /actual/ matches the regexp /expected/
+ *
+ * assert_class_string(object, class_name, description)
+ * asserts that the class string of /object/ as returned in
+ * Object.prototype.toString is equal to /class_name/.
+ *
+ * assert_own_property(object, property_name, description)
+ * assert that object has own property property_name
+ *
+ * assert_inherits(object, property_name, description)
+ * assert that object does not have an own property named property_name
+ * but that property_name is present in the prototype chain for object
+ *
+ * assert_idl_attribute(object, attribute_name, description)
+ * assert that an object that is an instance of some interface has the
+ * attribute attribute_name following the conditions specified by WebIDL
+ *
+ * assert_readonly(object, property_name, description)
+ * assert that property property_name on object is readonly
+ *
+ * assert_throws(code, func, description)
+ * code - the expected exception:
+ * o string: the thrown exception must be a DOMException with the given
+ * name, e.g., "TimeoutError" (for compatibility with existing
+ * tests, a constant is also supported, e.g., "TIMEOUT_ERR")
+ * o object: the thrown exception must have a property called "name" that
+ * matches code.name
+ * o null: allow any exception (in general, one of the options above
+ * should be used)
+ * func - a function that should throw
+ *
+ * assert_unreached(description)
+ * asserts if called. Used to ensure that some codepath is *not* taken e.g.
+ * an event does not fire.
+ *
+ * assert_any(assert_func, actual, expected_array, extra_arg_1, ... extra_arg_N)
+ * asserts that one assert_func(actual, expected_array_N, extra_arg1, ..., extra_arg_N)
+ * is true for some expected_array_N in expected_array. This only works for assert_func
+ * with signature assert_func(actual, expected, args_1, ..., args_N). Note that tests
+ * with multiple allowed pass conditions are bad practice unless the spec specifically
+ * allows multiple behaviours. Test authors should not use this method simply to hide
+ * UA bugs.
+ *
+ * assert_exists(object, property_name, description)
+ * *** deprecated ***
+ * asserts that object has an own property property_name
+ *
+ * assert_not_exists(object, property_name, description)
+ * *** deprecated ***
+ * assert that object does not have own property property_name
+ */
+
+(function ()
+{
+ var debug = false;
+ // default timeout is 5 seconds, test can override if needed
+ var settings = {
+ output:true,
+ timeout:5000,
+ test_timeout:2000
+ };
+
+ var xhtml_ns = "http://www.w3.org/1999/xhtml";
+
+ // script_prefix is used by Output.prototype.show_results() to figure out
+ // where to get testharness.css from. It's enclosed in an extra closure to
+ // not pollute the library's namespace with variables like "src".
+ var script_prefix = null;
+ (function ()
+ {
+ var scripts = document.getElementsByTagName("script");
+ for (var i = 0; i < scripts.length; i++)
+ {
+ if (scripts[i].src)
+ {
+ var src = scripts[i].src;
+ }
+ else if (scripts[i].href)
+ {
+ //SVG case
+ var src = scripts[i].href.baseVal;
+ }
+ if (src && src.slice(src.length - "testharness.js".length) === "testharness.js")
+ {
+ script_prefix = src.slice(0, src.length - "testharness.js".length);
+ break;
+ }
+ }
+ })();
+
+ /*
+ * API functions
+ */
+
+ var name_counter = 0;
+ function next_default_name()
+ {
+ //Don't use document.title to work around an Opera bug in XHTML documents
+ var prefix = document.getElementsByTagName("title").length > 0 ?
+ document.getElementsByTagName("title")[0].firstChild.data :
+ "Untitled";
+ var suffix = name_counter > 0 ? " " + name_counter : "";
+ name_counter++;
+ return prefix + suffix;
+ }
+
+ function test(func, name, properties)
+ {
+ var test_name = name ? name : next_default_name();
+ properties = properties ? properties : {};
+ var test_obj = new Test(test_name, properties);
+ test_obj.step(func);
+ if (test_obj.status === test_obj.NOTRUN) {
+ test_obj.done();
+ }
+ }
+
+ function async_test(func, name, properties)
+ {
+ if (typeof func !== "function") {
+ properties = name;
+ name = func;
+ func = null;
+ }
+ var test_name = name ? name : next_default_name();
+ properties = properties ? properties : {};
+ var test_obj = new Test(test_name, properties);
+ if (func) {
+ test_obj.step(func, test_obj, test_obj);
+ }
+ return test_obj;
+ }
+
+ function setup(func_or_properties, maybe_properties)
+ {
+ var func = null;
+ var properties = {};
+ if (arguments.length === 2) {
+ func = func_or_properties;
+ properties = maybe_properties;
+ } else if (func_or_properties instanceof Function){
+ func = func_or_properties;
+ } else {
+ properties = func_or_properties;
+ }
+ tests.setup(func, properties);
+ output.setup(properties);
+ }
+
+ function done() {
+ tests.end_wait();
+ }
+
+ function generate_tests(func, args, properties) {
+ forEach(args, function(x, i)
+ {
+ var name = x[0];
+ test(function()
+ {
+ func.apply(this, x.slice(1));
+ },
+ name,
+ Array.isArray(properties) ? properties[i] : properties);
+ });
+ }
+
+ function on_event(object, event, callback)
+ {
+ object.addEventListener(event, callback, false);
+ }
+
+ expose(test, 'test');
+ expose(async_test, 'async_test');
+ expose(generate_tests, 'generate_tests');
+ expose(setup, 'setup');
+ expose(done, 'done');
+ expose(on_event, 'on_event');
+
+ /*
+ * Return a string truncated to the given length, with ... added at the end
+ * if it was longer.
+ */
+ function truncate(s, len)
+ {
+ if (s.length > len) {
+ return s.substring(0, len - 3) + "...";
+ }
+ return s;
+ }
+
+ /*
+ * Convert a value to a nice, human-readable string
+ */
+ function format_value(val)
+ {
+ if (Array.isArray(val))
+ {
+ return "[" + val.map(format_value).join(", ") + "]";
+ }
+
+ switch (typeof val)
+ {
+ case "string":
+ val = val.replace("\\", "\\\\");
+ for (var i = 0; i < 32; i++)
+ {
+ var replace = "\\";
+ switch (i) {
+ case 0: replace += "0"; break;
+ case 1: replace += "x01"; break;
+ case 2: replace += "x02"; break;
+ case 3: replace += "x03"; break;
+ case 4: replace += "x04"; break;
+ case 5: replace += "x05"; break;
+ case 6: replace += "x06"; break;
+ case 7: replace += "x07"; break;
+ case 8: replace += "b"; break;
+ case 9: replace += "t"; break;
+ case 10: replace += "n"; break;
+ case 11: replace += "v"; break;
+ case 12: replace += "f"; break;
+ case 13: replace += "r"; break;
+ case 14: replace += "x0e"; break;
+ case 15: replace += "x0f"; break;
+ case 16: replace += "x10"; break;
+ case 17: replace += "x11"; break;
+ case 18: replace += "x12"; break;
+ case 19: replace += "x13"; break;
+ case 20: replace += "x14"; break;
+ case 21: replace += "x15"; break;
+ case 22: replace += "x16"; break;
+ case 23: replace += "x17"; break;
+ case 24: replace += "x18"; break;
+ case 25: replace += "x19"; break;
+ case 26: replace += "x1a"; break;
+ case 27: replace += "x1b"; break;
+ case 28: replace += "x1c"; break;
+ case 29: replace += "x1d"; break;
+ case 30: replace += "x1e"; break;
+ case 31: replace += "x1f"; break;
+ }
+ val = val.replace(RegExp(String.fromCharCode(i), "g"), replace);
+ }
+ return '"' + val.replace(/"/g, '\\"') + '"';
+ case "boolean":
+ case "undefined":
+ return String(val);
+ case "number":
+ // In JavaScript, -0 === 0 and String(-0) == "0", so we have to
+ // special-case.
+ if (val === -0 && 1/val === -Infinity)
+ {
+ return "-0";
+ }
+ return String(val);
+ case "object":
+ if (val === null)
+ {
+ return "null";
+ }
+
+ // Special-case Node objects, since those come up a lot in my tests. I
+ // ignore namespaces. I use duck-typing instead of instanceof, because
+ // instanceof doesn't work if the node is from another window (like an
+ // iframe's contentWindow):
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=12295
+ if ("nodeType" in val
+ && "nodeName" in val
+ && "nodeValue" in val
+ && "childNodes" in val)
+ {
+ switch (val.nodeType)
+ {
+ case Node.ELEMENT_NODE:
+ var ret = "<" + val.tagName.toLowerCase();
+ for (var i = 0; i < val.attributes.length; i++)
+ {
+ ret += " " + val.attributes[i].name + '="' + val.attributes[i].value + '"';
+ }
+ ret += ">" + val.innerHTML + "</" + val.tagName.toLowerCase() + ">";
+ return "Element node " + truncate(ret, 60);
+ case Node.TEXT_NODE:
+ return 'Text node "' + truncate(val.data, 60) + '"';
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ return "ProcessingInstruction node with target " + format_value(truncate(val.target, 60)) + " and data " + format_value(truncate(val.data, 60));
+ case Node.COMMENT_NODE:
+ return "Comment node <!--" + truncate(val.data, 60) + "-->";
+ case Node.DOCUMENT_NODE:
+ return "Document node with " + val.childNodes.length + (val.childNodes.length == 1 ? " child" : " children");
+ case Node.DOCUMENT_TYPE_NODE:
+ return "DocumentType node";
+ case Node.DOCUMENT_FRAGMENT_NODE:
+ return "DocumentFragment node with " + val.childNodes.length + (val.childNodes.length == 1 ? " child" : " children");
+ default:
+ return "Node object of unknown type";
+ }
+ }
+
+ // Fall through to default
+ default:
+ return typeof val + ' "' + truncate(String(val), 60) + '"';
+ }
+ }
+ expose(format_value, "format_value");
+
+ /*
+ * Assertions
+ */
+
+ function assert_true(actual, description)
+ {
+ assert(actual === true, "assert_true", description,
+ "expected true got ${actual}", {actual:actual});
+ };
+ expose(assert_true, "assert_true");
+
+ function assert_false(actual, description)
+ {
+ assert(actual === false, "assert_false", description,
+ "expected false got ${actual}", {actual:actual});
+ };
+ expose(assert_false, "assert_false");
+
+ function same_value(x, y) {
+ if (y !== y)
+ {
+ //NaN case
+ return x !== x;
+ }
+ else if (x === 0 && y === 0) {
+ //Distinguish +0 and -0
+ return 1/x === 1/y;
+ }
+ else
+ {
+ //typical case
+ return x === y;
+ }
+ }
+
+ function assert_equals(actual, expected, description)
+ {
+ /*
+ * Test if two primitives are equal or two objects
+ * are the same object
+ */
+ if (typeof actual != typeof expected)
+ {
+ assert(false, "assert_equals", description,
+ "expected (" + typeof expected + ") ${expected} but got (" + typeof actual + ") ${actual}",
+ {expected:expected, actual:actual});
+ return;
+ }
+ assert(same_value(actual, expected), "assert_equals", description,
+ "expected ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ };
+ expose(assert_equals, "assert_equals");
+
+ function assert_not_equals(actual, expected, description)
+ {
+ /*
+ * Test if two primitives are unequal or two objects
+ * are different objects
+ */
+ assert(!same_value(actual, expected), "assert_not_equals", description,
+ "got disallowed value ${actual}",
+ {actual:actual});
+ };
+ expose(assert_not_equals, "assert_not_equals");
+
+ function assert_in_array(actual, expected, description)
+ {
+ assert(expected.indexOf(actual) != -1, "assert_in_array", description,
+ "value ${actual} not in array ${expected}",
+ {actual:actual, expected:expected});
+ }
+ expose(assert_in_array, "assert_in_array");
+
+ function assert_object_equals(actual, expected, description)
+ {
+ //This needs to be improved a great deal
+ function check_equal(actual, expected, stack)
+ {
+ stack.push(actual);
+
+ var p;
+ for (p in actual)
+ {
+ assert(expected.hasOwnProperty(p), "assert_object_equals", description,
+ "unexpected property ${p}", {p:p});
+
+ if (typeof actual[p] === "object" && actual[p] !== null)
+ {
+ if (stack.indexOf(actual[p]) === -1)
+ {
+ check_equal(actual[p], expected[p], stack);
+ }
+ }
+ else
+ {
+ assert(same_value(actual[p], expected[p]), "assert_object_equals", description,
+ "property ${p} expected ${expected} got ${actual}",
+ {p:p, expected:expected, actual:actual});
+ }
+ }
+ for (p in expected)
+ {
+ assert(actual.hasOwnProperty(p),
+ "assert_object_equals", description,
+ "expected property ${p} missing", {p:p});
+ }
+ stack.pop();
+ }
+ check_equal(actual, expected, []);
+ };
+ expose(assert_object_equals, "assert_object_equals");
+
+ function assert_array_equals(actual, expected, description)
+ {
+ assert(actual.length === expected.length,
+ "assert_array_equals", description,
+ "lengths differ, expected ${expected} got ${actual}",
+ {expected:expected.length, actual:actual.length});
+
+ for (var i=0; i < actual.length; i++)
+ {
+ assert(actual.hasOwnProperty(i) === expected.hasOwnProperty(i),
+ "assert_array_equals", description,
+ "property ${i}, property expected to be $expected but was $actual",
+ {i:i, expected:expected.hasOwnProperty(i) ? "present" : "missing",
+ actual:actual.hasOwnProperty(i) ? "present" : "missing"});
+ assert(same_value(expected[i], actual[i]),
+ "assert_array_equals", description,
+ "property ${i}, expected ${expected} but got ${actual}",
+ {i:i, expected:expected[i], actual:actual[i]});
+ }
+ }
+ expose(assert_array_equals, "assert_array_equals");
+
+ function assert_approx_equals(actual, expected, epsilon, description)
+ {
+ /*
+ * Test if two primitive numbers are equal withing +/- epsilon
+ */
+ assert(typeof actual === "number",
+ "assert_approx_equals", description,
+ "expected a number but got a ${type_actual}",
+ {type_actual:typeof actual});
+
+ assert(Math.abs(actual - expected) <= epsilon,
+ "assert_approx_equals", description,
+ "expected ${expected} +/- ${epsilon} but got ${actual}",
+ {expected:expected, actual:actual, epsilon:epsilon});
+ };
+ expose(assert_approx_equals, "assert_approx_equals");
+
+ function assert_less_than(actual, expected, description)
+ {
+ /*
+ * Test if a primitive number is less than another
+ */
+ assert(typeof actual === "number",
+ "assert_less_than", description,
+ "expected a number but got a ${type_actual}",
+ {type_actual:typeof actual});
+
+ assert(actual < expected,
+ "assert_less_than", description,
+ "expected a number less than ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ };
+ expose(assert_less_than, "assert_less_than");
+
+ function assert_greater_than(actual, expected, description)
+ {
+ /*
+ * Test if a primitive number is greater than another
+ */
+ assert(typeof actual === "number",
+ "assert_greater_than", description,
+ "expected a number but got a ${type_actual}",
+ {type_actual:typeof actual});
+
+ assert(actual > expected,
+ "assert_greater_than", description,
+ "expected a number greater than ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ };
+ expose(assert_greater_than, "assert_greater_than");
+
+ function assert_less_than_equal(actual, expected, description)
+ {
+ /*
+ * Test if a primitive number is less than or equal to another
+ */
+ assert(typeof actual === "number",
+ "assert_less_than_equal", description,
+ "expected a number but got a ${type_actual}",
+ {type_actual:typeof actual});
+
+ assert(actual <= expected,
+ "assert_less_than", description,
+ "expected a number less than or equal to ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ };
+ expose(assert_less_than_equal, "assert_less_than_equal");
+
+ function assert_greater_than_equal(actual, expected, description)
+ {
+ /*
+ * Test if a primitive number is greater than or equal to another
+ */
+ assert(typeof actual === "number",
+ "assert_greater_than_equal", description,
+ "expected a number but got a ${type_actual}",
+ {type_actual:typeof actual});
+
+ assert(actual >= expected,
+ "assert_greater_than_equal", description,
+ "expected a number greater than or equal to ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ };
+ expose(assert_greater_than_equal, "assert_greater_than_equal");
+
+ function assert_regexp_match(actual, expected, description) {
+ /*
+ * Test if a string (actual) matches a regexp (expected)
+ */
+ assert(expected.test(actual),
+ "assert_regexp_match", description,
+ "expected ${expected} but got ${actual}",
+ {expected:expected, actual:actual});
+ }
+ expose(assert_regexp_match, "assert_regexp_match");
+
+ function assert_class_string(object, class_string, description) {
+ assert_equals({}.toString.call(object), "[object " + class_string + "]",
+ description);
+ }
+ expose(assert_class_string, "assert_class_string");
+
+
+ function _assert_own_property(name) {
+ return function(object, property_name, description)
+ {
+ assert(object.hasOwnProperty(property_name),
+ name, description,
+ "expected property ${p} missing", {p:property_name});
+ };
+ }
+ expose(_assert_own_property("assert_exists"), "assert_exists");
+ expose(_assert_own_property("assert_own_property"), "assert_own_property");
+
+ function assert_not_exists(object, property_name, description)
+ {
+ assert(!object.hasOwnProperty(property_name),
+ "assert_not_exists", description,
+ "unexpected property ${p} found", {p:property_name});
+ };
+ expose(assert_not_exists, "assert_not_exists");
+
+ function _assert_inherits(name) {
+ return function (object, property_name, description)
+ {
+ assert(typeof object === "object",
+ name, description,
+ "provided value is not an object");
+
+ assert("hasOwnProperty" in object,
+ name, description,
+ "provided value is an object but has no hasOwnProperty method");
+
+ assert(!object.hasOwnProperty(property_name),
+ name, description,
+ "property ${p} found on object expected in prototype chain",
+ {p:property_name});
+
+ assert(property_name in object,
+ name, description,
+ "property ${p} not found in prototype chain",
+ {p:property_name});
+ };
+ }
+ expose(_assert_inherits("assert_inherits"), "assert_inherits");
+ expose(_assert_inherits("assert_idl_attribute"), "assert_idl_attribute");
+
+ function assert_readonly(object, property_name, description)
+ {
+ var initial_value = object[property_name];
+ try {
+ //Note that this can have side effects in the case where
+ //the property has PutForwards
+ object[property_name] = initial_value + "a"; //XXX use some other value here?
+ assert(same_value(object[property_name], initial_value),
+ "assert_readonly", description,
+ "changing property ${p} succeeded",
+ {p:property_name});
+ }
+ finally
+ {
+ object[property_name] = initial_value;
+ }
+ };
+ expose(assert_readonly, "assert_readonly");
+
+ function assert_throws(code, func, description)
+ {
+ try
+ {
+ func.call(this);
+ assert(false, "assert_throws", description,
+ "${func} did not throw", {func:func});
+ }
+ catch(e)
+ {
+ if (e instanceof AssertionError) {
+ throw(e);
+ }
+ if (code === null)
+ {
+ return;
+ }
+ if (typeof code === "object")
+ {
+ assert(typeof e == "object" && "name" in e && e.name == code.name,
+ "assert_throws", description,
+ "${func} threw ${actual} (${actual_name}) expected ${expected} (${expected_name})",
+ {func:func, actual:e, actual_name:e.name,
+ expected:code,
+ expected_name:code.name});
+ return;
+ }
+
+ var code_name_map = {
+ INDEX_SIZE_ERR: 'IndexSizeError',
+ HIERARCHY_REQUEST_ERR: 'HierarchyRequestError',
+ WRONG_DOCUMENT_ERR: 'WrongDocumentError',
+ INVALID_CHARACTER_ERR: 'InvalidCharacterError',
+ NO_MODIFICATION_ALLOWED_ERR: 'NoModificationAllowedError',
+ NOT_FOUND_ERR: 'NotFoundError',
+ NOT_SUPPORTED_ERR: 'NotSupportedError',
+ INVALID_STATE_ERR: 'InvalidStateError',
+ SYNTAX_ERR: 'SyntaxError',
+ INVALID_MODIFICATION_ERR: 'InvalidModificationError',
+ NAMESPACE_ERR: 'NamespaceError',
+ INVALID_ACCESS_ERR: 'InvalidAccessError',
+ TYPE_MISMATCH_ERR: 'TypeMismatchError',
+ SECURITY_ERR: 'SecurityError',
+ NETWORK_ERR: 'NetworkError',
+ ABORT_ERR: 'AbortError',
+ URL_MISMATCH_ERR: 'URLMismatchError',
+ QUOTA_EXCEEDED_ERR: 'QuotaExceededError',
+ TIMEOUT_ERR: 'TimeoutError',
+ INVALID_NODE_TYPE_ERR: 'InvalidNodeTypeError',
+ DATA_CLONE_ERR: 'DataCloneError'
+ };
+
+ var name = code in code_name_map ? code_name_map[code] : code;
+
+ var name_code_map = {
+ IndexSizeError: 1,
+ HierarchyRequestError: 3,
+ WrongDocumentError: 4,
+ InvalidCharacterError: 5,
+ NoModificationAllowedError: 7,
+ NotFoundError: 8,
+ NotSupportedError: 9,
+ InvalidStateError: 11,
+ SyntaxError: 12,
+ InvalidModificationError: 13,
+ NamespaceError: 14,
+ InvalidAccessError: 15,
+ TypeMismatchError: 17,
+ SecurityError: 18,
+ NetworkError: 19,
+ AbortError: 20,
+ URLMismatchError: 21,
+ QuotaExceededError: 22,
+ TimeoutError: 23,
+ InvalidNodeTypeError: 24,
+ DataCloneError: 25,
+
+ UnknownError: 0,
+ ConstraintError: 0,
+ DataError: 0,
+ TransactionInactiveError: 0,
+ ReadOnlyError: 0,
+ VersionError: 0
+ };
+
+ if (!(name in name_code_map))
+ {
+ throw new AssertionError('Test bug: unrecognized DOMException code "' + code + '" passed to assert_throws()');
+ }
+
+ var required_props = { code: name_code_map[name] };
+
+ if (required_props.code === 0
+ || ("name" in e && e.name !== e.name.toUpperCase() && e.name !== "DOMException"))
+ {
+ // New style exception: also test the name property.
+ required_props.name = name;
+ }
+
+ //We'd like to test that e instanceof the appropriate interface,
+ //but we can't, because we don't know what window it was created
+ //in. It might be an instanceof the appropriate interface on some
+ //unknown other window. TODO: Work around this somehow?
+
+ assert(typeof e == "object",
+ "assert_throws", description,
+ "${func} threw ${e} with type ${type}, not an object",
+ {func:func, e:e, type:typeof e});
+
+ for (var prop in required_props)
+ {
+ assert(typeof e == "object" && prop in e && e[prop] == required_props[prop],
+ "assert_throws", description,
+ "${func} threw ${e} that is not a DOMException " + code + ": property ${prop} is equal to ${actual}, expected ${expected}",
+ {func:func, e:e, prop:prop, actual:e[prop], expected:required_props[prop]});
+ }
+ }
+ }
+ expose(assert_throws, "assert_throws");
+
+ function assert_unreached(description) {
+ assert(false, "assert_unreached", description,
+ "Reached unreachable code");
+ }
+ expose(assert_unreached, "assert_unreached");
+
+ function assert_any(assert_func, actual, expected_array)
+ {
+ var args = [].slice.call(arguments, 3)
+ var errors = []
+ var passed = false;
+ forEach(expected_array,
+ function(expected)
+ {
+ try {
+ assert_func.apply(this, [actual, expected].concat(args))
+ passed = true;
+ } catch(e) {
+ errors.push(e.message);
+ }
+ });
+ if (!passed) {
+ throw new AssertionError(errors.join("\n\n"));
+ }
+ }
+ expose(assert_any, "assert_any");
+
+ function Test(name, properties)
+ {
+ this.name = name;
+ this.status = this.NOTRUN;
+ this.timeout_id = null;
+ this.is_done = false;
+
+ this.properties = properties;
+ this.timeout_length = properties.timeout ? properties.timeout : settings.test_timeout;
+
+ this.message = null;
+
+ var this_obj = this;
+ this.steps = [];
+
+ tests.push(this);
+ }
+
+ Test.statuses = {
+ PASS:0,
+ FAIL:1,
+ TIMEOUT:2,
+ NOTRUN:3
+ };
+
+ Test.prototype = merge({}, Test.statuses);
+
+ Test.prototype.structured_clone = function()
+ {
+ if(!this._structured_clone)
+ {
+ var msg = this.message;
+ msg = msg ? String(msg) : msg;
+ this._structured_clone = merge({
+ name:String(this.name),
+ status:this.status,
+ message:msg
+ }, Test.statuses);
+ }
+ return this._structured_clone;
+ };
+
+ Test.prototype.step = function(func, this_obj)
+ {
+ //In case the test has already failed
+ if (this.status !== this.NOTRUN)
+ {
+ return;
+ }
+
+ tests.started = true;
+
+ if (this.timeout_id === null) {
+ this.set_timeout();
+ }
+
+ this.steps.push(func);
+
+ if (arguments.length === 1)
+ {
+ this_obj = this;
+ }
+
+ try
+ {
+ return func.apply(this_obj, Array.prototype.slice.call(arguments, 2));
+ }
+ catch(e)
+ {
+ //This can happen if something called synchronously invoked another
+ //step
+ if (this.status !== this.NOTRUN)
+ {
+ return;
+ }
+ this.status = this.FAIL;
+ this.message = (typeof e === "object" && e !== null) ? e.message : e;
+ if (typeof e.stack != "undefined" && typeof e.message == "string") {
+ //Try to make it more informative for some exceptions, at least
+ //in Gecko and WebKit. This results in a stack dump instead of
+ //just errors like "Cannot read property 'parentNode' of null"
+ //or "root is null". Makes it a lot longer, of course.
+ this.message += "(stack: " + e.stack + ")";
+ }
+ this.done();
+ if (debug && e.constructor !== AssertionError) {
+ throw e;
+ }
+ }
+ };
+
+ Test.prototype.step_func = function(func, this_obj)
+ {
+ var test_this = this;
+
+ if (arguments.length === 1)
+ {
+ this_obj = test_this;
+ }
+
+ return function()
+ {
+ test_this.step.apply(test_this, [func, this_obj].concat(
+ Array.prototype.slice.call(arguments)));
+ };
+ };
+
+ Test.prototype.step_func_done = function(func, this_obj)
+ {
+ var test_this = this;
+
+ if (arguments.length === 1)
+ {
+ this_obj = test_this;
+ }
+
+ return function()
+ {
+ test_this.step.apply(test_this, [func, this_obj].concat(
+ Array.prototype.slice.call(arguments)));
+ test_this.done();
+ };
+ };
+
+ Test.prototype.set_timeout = function()
+ {
+ var this_obj = this;
+ this.timeout_id = setTimeout(function()
+ {
+ this_obj.timeout();
+ }, this.timeout_length);
+ };
+
+ Test.prototype.timeout = function()
+ {
+ this.status = this.TIMEOUT;
+ this.timeout_id = null;
+ this.message = "Test timed out";
+ this.done();
+ };
+
+ Test.prototype.done = function()
+ {
+ if (this.is_done) {
+ return;
+ }
+ clearTimeout(this.timeout_id);
+ if (this.status === this.NOTRUN)
+ {
+ this.status = this.PASS;
+ }
+ this.is_done = true;
+ tests.result(this);
+ };
+
+
+ /*
+ * Harness
+ */
+
+ function TestsStatus()
+ {
+ this.status = null;
+ this.message = null;
+ }
+
+ TestsStatus.statuses = {
+ OK:0,
+ ERROR:1,
+ TIMEOUT:2
+ };
+
+ TestsStatus.prototype = merge({}, TestsStatus.statuses);
+
+ TestsStatus.prototype.structured_clone = function()
+ {
+ if(!this._structured_clone)
+ {
+ var msg = this.message;
+ msg = msg ? String(msg) : msg;
+ this._structured_clone = merge({
+ status:this.status,
+ message:msg
+ }, TestsStatus.statuses);
+ }
+ return this._structured_clone;
+ };
+
+ function Tests()
+ {
+ this.tests = [];
+ this.num_pending = 0;
+
+ this.phases = {
+ INITIAL:0,
+ SETUP:1,
+ HAVE_TESTS:2,
+ HAVE_RESULTS:3,
+ COMPLETE:4
+ };
+ this.phase = this.phases.INITIAL;
+
+ this.properties = {};
+
+ //All tests can't be done until the load event fires
+ this.all_loaded = false;
+ this.wait_for_finish = false;
+ this.processing_callbacks = false;
+
+ this.timeout_length = settings.timeout;
+ this.timeout_id = null;
+
+ this.start_callbacks = [];
+ this.test_done_callbacks = [];
+ this.all_done_callbacks = [];
+
+ this.status = new TestsStatus();
+
+ var this_obj = this;
+
+ on_event(window, "load",
+ function()
+ {
+ this_obj.all_loaded = true;
+ if (this_obj.all_done())
+ {
+ this_obj.complete();
+ }
+ });
+
+ this.set_timeout();
+ }
+
+ Tests.prototype.setup = function(func, properties)
+ {
+ if (this.phase >= this.phases.HAVE_RESULTS)
+ {
+ return;
+ }
+ if (this.phase < this.phases.SETUP)
+ {
+ this.phase = this.phases.SETUP;
+ }
+
+ for (var p in properties)
+ {
+ if (properties.hasOwnProperty(p))
+ {
+ this.properties[p] = properties[p];
+ }
+ }
+
+ if (properties.timeout)
+ {
+ this.timeout_length = properties.timeout;
+ }
+ if (properties.explicit_done)
+ {
+ this.wait_for_finish = true;
+ }
+ if (properties.explicit_timeout) {
+ this.timeout_length = null;
+ }
+
+ if (func)
+ {
+ try
+ {
+ func();
+ } catch(e)
+ {
+ this.status.status = this.status.ERROR;
+ this.status.message = e;
+ };
+ }
+ this.set_timeout();
+ };
+
+ Tests.prototype.set_timeout = function()
+ {
+ var this_obj = this;
+ clearTimeout(this.timeout_id);
+ if (this.timeout_length !== null)
+ {
+ this.timeout_id = setTimeout(function() {
+ this_obj.timeout();
+ }, this.timeout_length);
+ }
+ };
+
+ Tests.prototype.timeout = function() {
+ this.status.status = this.status.TIMEOUT;
+ this.complete();
+ };
+
+ Tests.prototype.end_wait = function()
+ {
+ this.wait_for_finish = false;
+ if (this.all_done()) {
+ this.complete();
+ }
+ };
+
+ Tests.prototype.push = function(test)
+ {
+ if (this.phase < this.phases.HAVE_TESTS) {
+ this.start();
+ }
+ this.num_pending++;
+ this.tests.push(test);
+ };
+
+ Tests.prototype.all_done = function() {
+ return (this.all_loaded && this.num_pending === 0 &&
+ !this.wait_for_finish && !this.processing_callbacks);
+ };
+
+ Tests.prototype.start = function() {
+ this.phase = this.phases.HAVE_TESTS;
+ this.notify_start();
+ };
+
+ Tests.prototype.notify_start = function() {
+ var this_obj = this;
+ forEach (this.start_callbacks,
+ function(callback)
+ {
+ callback(this_obj.properties);
+ });
+ forEach_windows(
+ function(w, is_same_origin)
+ {
+ if(is_same_origin && w.start_callback)
+ {
+ try
+ {
+ w.start_callback(this_obj.properties);
+ }
+ catch(e)
+ {
+ if (debug)
+ {
+ throw(e);
+ }
+ }
+ }
+ if (supports_post_message(w) && w !== self)
+ {
+ w.postMessage({
+ type: "start",
+ properties: this_obj.properties
+ }, "*");
+ }
+ });
+ };
+
+ Tests.prototype.result = function(test)
+ {
+ if (this.phase > this.phases.HAVE_RESULTS)
+ {
+ return;
+ }
+ this.phase = this.phases.HAVE_RESULTS;
+ this.num_pending--;
+ this.notify_result(test);
+ };
+
+ Tests.prototype.notify_result = function(test) {
+ var this_obj = this;
+ this.processing_callbacks = true;
+ forEach(this.test_done_callbacks,
+ function(callback)
+ {
+ callback(test, this_obj);
+ });
+
+ forEach_windows(
+ function(w, is_same_origin)
+ {
+ if(is_same_origin && w.result_callback)
+ {
+ try
+ {
+ w.result_callback(test);
+ }
+ catch(e)
+ {
+ if(debug) {
+ throw e;
+ }
+ }
+ }
+ if (supports_post_message(w) && w !== self)
+ {
+ w.postMessage({
+ type: "result",
+ test: test.structured_clone()
+ }, "*");
+ }
+ });
+ this.processing_callbacks = false;
+ if (this_obj.all_done())
+ {
+ this_obj.complete();
+ }
+ };
+
+ Tests.prototype.complete = function() {
+ if (this.phase === this.phases.COMPLETE) {
+ return;
+ }
+ this.phase = this.phases.COMPLETE;
+ var this_obj = this;
+ this.tests.forEach(
+ function(x)
+ {
+ if(x.status === x.NOTRUN)
+ {
+ this_obj.notify_result(x);
+ }
+ }
+ );
+ this.notify_complete();
+ };
+
+ Tests.prototype.notify_complete = function()
+ {
+ clearTimeout(this.timeout_id);
+ var this_obj = this;
+ var tests = map(this_obj.tests,
+ function(test)
+ {
+ return test.structured_clone();
+ });
+ if (this.status.status === null)
+ {
+ this.status.status = this.status.OK;
+ }
+
+ forEach (this.all_done_callbacks,
+ function(callback)
+ {
+ callback(this_obj.tests, this_obj.status);
+ });
+
+ forEach_windows(
+ function(w, is_same_origin)
+ {
+ if(is_same_origin && w.completion_callback)
+ {
+ try
+ {
+ w.completion_callback(this_obj.tests, this_obj.status);
+ }
+ catch(e)
+ {
+ if (debug)
+ {
+ throw e;
+ }
+ }
+ }
+ if (supports_post_message(w) && w !== self)
+ {
+ w.postMessage({
+ type: "complete",
+ tests: tests,
+ status: this_obj.status.structured_clone()
+ }, "*");
+ }
+ });
+ };
+
+ var tests = new Tests();
+
+ function timeout() {
+ if (tests.timeout_length === null)
+ {
+ tests.timeout();
+ }
+ }
+ expose(timeout, 'timeout');
+
+ function add_start_callback(callback) {
+ tests.start_callbacks.push(callback);
+ }
+
+ function add_result_callback(callback)
+ {
+ tests.test_done_callbacks.push(callback);
+ }
+
+ function add_completion_callback(callback)
+ {
+ tests.all_done_callbacks.push(callback);
+ }
+
+ expose(add_start_callback, 'add_start_callback');
+ expose(add_result_callback, 'add_result_callback');
+ expose(add_completion_callback, 'add_completion_callback');
+
+ /*
+ * Output listener
+ */
+
+ function Output() {
+ this.output_document = document;
+ this.output_node = null;
+ this.done_count = 0;
+ this.enabled = settings.output;
+ this.phase = this.INITIAL;
+ }
+
+ Output.prototype.INITIAL = 0;
+ Output.prototype.STARTED = 1;
+ Output.prototype.HAVE_RESULTS = 2;
+ Output.prototype.COMPLETE = 3;
+
+ Output.prototype.setup = function(properties) {
+ if (this.phase > this.INITIAL) {
+ return;
+ }
+
+ //If output is disabled in testharnessreport.js the test shouldn't be
+ //able to override that
+ this.enabled = this.enabled && (properties.hasOwnProperty("output") ?
+ properties.output : settings.output);
+ };
+
+ Output.prototype.init = function(properties)
+ {
+ if (this.phase >= this.STARTED) {
+ return;
+ }
+ if (properties.output_document) {
+ this.output_document = properties.output_document;
+ } else {
+ this.output_document = document;
+ }
+ this.phase = this.STARTED;
+ };
+
+ Output.prototype.resolve_log = function()
+ {
+ var output_document;
+ if (typeof this.output_document === "function")
+ {
+ output_document = this.output_document.apply(undefined);
+ } else
+ {
+ output_document = this.output_document;
+ }
+ if (!output_document)
+ {
+ return;
+ }
+ var node = output_document.getElementById("log");
+ if (node)
+ {
+ this.output_document = output_document;
+ this.output_node = node;
+ }
+ };
+
+ Output.prototype.show_status = function(test)
+ {
+ if (this.phase < this.STARTED)
+ {
+ this.init();
+ }
+ if (!this.enabled)
+ {
+ return;
+ }
+ if (this.phase < this.HAVE_RESULTS)
+ {
+ this.resolve_log();
+ this.phase = this.HAVE_RESULTS;
+ }
+ this.done_count++;
+ if (this.output_node)
+ {
+ if (this.done_count < 100
+ || (this.done_count < 1000 && this.done_count % 100 == 0)
+ || this.done_count % 1000 == 0) {
+ this.output_node.textContent = "Running, "
+ + this.done_count + " complete, "
+ + tests.num_pending + " remain";
+ }
+ }
+ };
+
+ Output.prototype.show_results = function (tests, harness_status)
+ {
+ if (this.phase >= this.COMPLETE) {
+ return;
+ }
+ if (!this.enabled)
+ {
+ return;
+ }
+ if (!this.output_node) {
+ this.resolve_log();
+ }
+ this.phase = this.COMPLETE;
+
+ var log = this.output_node;
+ if (!log)
+ {
+ return;
+ }
+ var output_document = this.output_document;
+
+ while (log.lastChild)
+ {
+ log.removeChild(log.lastChild);
+ }
+
+ if (script_prefix != null) {
+ var stylesheet = output_document.createElementNS(xhtml_ns, "link");
+ stylesheet.setAttribute("rel", "stylesheet");
+ stylesheet.setAttribute("href", script_prefix + "testharness.css");
+ var heads = output_document.getElementsByTagName("head");
+ if (heads.length) {
+ heads[0].appendChild(stylesheet);
+ }
+ }
+
+ var status_text = {};
+ status_text[Test.prototype.PASS] = "Pass";
+ status_text[Test.prototype.FAIL] = "Fail";
+ status_text[Test.prototype.TIMEOUT] = "Timeout";
+ status_text[Test.prototype.NOTRUN] = "Not Run";
+
+ var status_number = {};
+ forEach(tests, function(test) {
+ var status = status_text[test.status];
+ if (status_number.hasOwnProperty(status))
+ {
+ status_number[status] += 1;
+ } else {
+ status_number[status] = 1;
+ }
+ });
+
+ function status_class(status)
+ {
+ return status.replace(/\s/g, '').toLowerCase();
+ }
+
+ var summary_template = ["section", {"id":"summary"},
+ ["h2", {}, "Summary"],
+ ["p", {}, "Found ${num_tests} tests"],
+ function(vars) {
+ var rv = [["div", {}]];
+ var i=0;
+ while (status_text.hasOwnProperty(i)) {
+ if (status_number.hasOwnProperty(status_text[i])) {
+ var status = status_text[i];
+ rv[0].push(["div", {"class":status_class(status)},
+ ["label", {},
+ ["input", {type:"checkbox", checked:"checked"}],
+ status_number[status] + " " + status]]);
+ }
+ i++;
+ }
+ return rv;
+ }];
+
+ log.appendChild(render(summary_template, {num_tests:tests.length}, output_document));
+
+ forEach(output_document.querySelectorAll("section#summary label"),
+ function(element)
+ {
+ on_event(element, "click",
+ function(e)
+ {
+ if (output_document.getElementById("results") === null)
+ {
+ e.preventDefault();
+ return;
+ }
+ var result_class = element.parentNode.getAttribute("class");
+ var style_element = output_document.querySelector("style#hide-" + result_class);
+ var input_element = element.querySelector("input");
+ if (!style_element && !input_element.checked) {
+ style_element = output_document.createElementNS(xhtml_ns, "style");
+ style_element.id = "hide-" + result_class;
+ style_element.textContent = "table#results > tbody > tr."+result_class+"{display:none}";
+ output_document.body.appendChild(style_element);
+ } else if (style_element && input_element.checked) {
+ style_element.parentNode.removeChild(style_element);
+ }
+ });
+ });
+
+ // This use of innerHTML plus manual escaping is not recommended in
+ // general, but is necessary here for performance. Using textContent
+ // on each individual <td> adds tens of seconds of execution time for
+ // large test suites (tens of thousands of tests).
+ function escape_html(s)
+ {
+ return s.replace(/\&/g, "&")
+ .replace(/</g, "<")
+ .replace(/"/g, """)
+ .replace(/'/g, "'");
+ }
+
+ function has_assertions()
+ {
+ for (var i = 0; i < tests.length; i++) {
+ if (tests[i].properties.hasOwnProperty("assert")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function get_assertion(test)
+ {
+ if (test.properties.hasOwnProperty("assert")) {
+ if (Array.isArray(test.properties.assert)) {
+ return test.properties.assert.join(' ');
+ }
+ return test.properties.assert;
+ }
+ return '';
+ }
+
+ log.appendChild(document.createElementNS(xhtml_ns, "section"));
+ var assertions = has_assertions();
+ var html = "<h2>Details</h2><table id='results' " + (assertions ? "class='assertions'" : "" ) + ">"
+ + "<thead><tr><th>Result</th><th>Test Name</th>"
+ + (assertions ? "<th>Assertion</th>" : "")
+ + "<th>Message</th></tr></thead>"
+ + "<tbody>";
+ for (var i = 0; i < tests.length; i++) {
+ html += '<tr class="'
+ + escape_html(status_class(status_text[tests[i].status]))
+ + '"><td>'
+ + escape_html(status_text[tests[i].status])
+ + "</td><td>"
+ + escape_html(tests[i].name)
+ + "</td><td>"
+ + (assertions ? escape_html(get_assertion(tests[i])) + "</td><td>" : "")
+ + escape_html(tests[i].message ? tests[i].message : " ")
+ + "</td></tr>";
+ }
+ html += "</tbody></table>";
+ try {
+ log.lastChild.innerHTML = html;
+ } catch (e) {
+ log.appendChild(document.createElementNS(xhtml_ns, "p"))
+ .textContent = "Setting innerHTML for the log threw an exception.";
+ log.appendChild(document.createElementNS(xhtml_ns, "pre"))
+ .textContent = html;
+ }
+ };
+
+ var output = new Output();
+ add_start_callback(function (properties) {output.init(properties);});
+ add_result_callback(function (test) {output.show_status(tests);});
+ add_completion_callback(function (tests, harness_status) {output.show_results(tests, harness_status);});
+
+ /*
+ * Template code
+ *
+ * A template is just a javascript structure. An element is represented as:
+ *
+ * [tag_name, {attr_name:attr_value}, child1, child2]
+ *
+ * the children can either be strings (which act like text nodes), other templates or
+ * functions (see below)
+ *
+ * A text node is represented as
+ *
+ * ["{text}", value]
+ *
+ * String values have a simple substitution syntax; ${foo} represents a variable foo.
+ *
+ * It is possible to embed logic in templates by using a function in a place where a
+ * node would usually go. The function must either return part of a template or null.
+ *
+ * In cases where a set of nodes are required as output rather than a single node
+ * with children it is possible to just use a list
+ * [node1, node2, node3]
+ *
+ * Usage:
+ *
+ * render(template, substitutions) - take a template and an object mapping
+ * variable names to parameters and return either a DOM node or a list of DOM nodes
+ *
+ * substitute(template, substitutions) - take a template and variable mapping object,
+ * make the variable substitutions and return the substituted template
+ *
+ */
+
+ function is_single_node(template)
+ {
+ return typeof template[0] === "string";
+ }
+
+ function substitute(template, substitutions)
+ {
+ if (typeof template === "function") {
+ var replacement = template(substitutions);
+ if (replacement)
+ {
+ var rv = substitute(replacement, substitutions);
+ return rv;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ else if (is_single_node(template))
+ {
+ return substitute_single(template, substitutions);
+ }
+ else
+ {
+ return filter(map(template, function(x) {
+ return substitute(x, substitutions);
+ }), function(x) {return x !== null;});
+ }
+ }
+
+ function substitute_single(template, substitutions)
+ {
+ var substitution_re = /\${([^ }]*)}/g;
+
+ function do_substitution(input) {
+ var components = input.split(substitution_re);
+ var rv = [];
+ for (var i=0; i<components.length; i+=2)
+ {
+ rv.push(components[i]);
+ if (components[i+1])
+ {
+ rv.push(String(substitutions[components[i+1]]));
+ }
+ }
+ return rv;
+ }
+
+ var rv = [];
+ rv.push(do_substitution(String(template[0])).join(""));
+
+ if (template[0] === "{text}") {
+ substitute_children(template.slice(1), rv);
+ } else {
+ substitute_attrs(template[1], rv);
+ substitute_children(template.slice(2), rv);
+ }
+
+ function substitute_attrs(attrs, rv)
+ {
+ rv[1] = {};
+ for (var name in template[1])
+ {
+ if (attrs.hasOwnProperty(name))
+ {
+ var new_name = do_substitution(name).join("");
+ var new_value = do_substitution(attrs[name]).join("");
+ rv[1][new_name] = new_value;
+ };
+ }
+ }
+
+ function substitute_children(children, rv)
+ {
+ for (var i=0; i<children.length; i++)
+ {
+ if (children[i] instanceof Object) {
+ var replacement = substitute(children[i], substitutions);
+ if (replacement !== null)
+ {
+ if (is_single_node(replacement))
+ {
+ rv.push(replacement);
+ }
+ else
+ {
+ extend(rv, replacement);
+ }
+ }
+ }
+ else
+ {
+ extend(rv, do_substitution(String(children[i])));
+ }
+ }
+ return rv;
+ }
+
+ return rv;
+ }
+
+ function make_dom_single(template, doc)
+ {
+ var output_document = doc || document;
+ if (template[0] === "{text}")
+ {
+ var element = output_document.createTextNode("");
+ for (var i=1; i<template.length; i++)
+ {
+ element.data += template[i];
+ }
+ }
+ else
+ {
+ var element = output_document.createElementNS(xhtml_ns, template[0]);
+ for (var name in template[1]) {
+ if (template[1].hasOwnProperty(name))
+ {
+ element.setAttribute(name, template[1][name]);
+ }
+ }
+ for (var i=2; i<template.length; i++)
+ {
+ if (template[i] instanceof Object)
+ {
+ var sub_element = make_dom(template[i]);
+ element.appendChild(sub_element);
+ }
+ else
+ {
+ var text_node = output_document.createTextNode(template[i]);
+ element.appendChild(text_node);
+ }
+ }
+ }
+
+ return element;
+ }
+
+
+
+ function make_dom(template, substitutions, output_document)
+ {
+ if (is_single_node(template))
+ {
+ return make_dom_single(template, output_document);
+ }
+ else
+ {
+ return map(template, function(x) {
+ return make_dom_single(x, output_document);
+ });
+ }
+ }
+
+ function render(template, substitutions, output_document)
+ {
+ return make_dom(substitute(template, substitutions), output_document);
+ }
+
+ /*
+ * Utility funcions
+ */
+ function assert(expected_true, function_name, description, error, substitutions)
+ {
+ if (expected_true !== true)
+ {
+ throw new AssertionError(make_message(function_name, description,
+ error, substitutions));
+ }
+ }
+
+ function AssertionError(message)
+ {
+ this.message = message;
+ }
+
+ function make_message(function_name, description, error, substitutions)
+ {
+ for (var p in substitutions) {
+ if (substitutions.hasOwnProperty(p)) {
+ substitutions[p] = format_value(substitutions[p]);
+ }
+ }
+ var node_form = substitute(["{text}", "${function_name}: ${description}" + error],
+ merge({function_name:function_name,
+ description:(description?description + " ":"")},
+ substitutions));
+ return node_form.slice(1).join("");
+ }
+
+ function filter(array, callable, thisObj) {
+ var rv = [];
+ for (var i=0; i<array.length; i++)
+ {
+ if (array.hasOwnProperty(i))
+ {
+ var pass = callable.call(thisObj, array[i], i, array);
+ if (pass) {
+ rv.push(array[i]);
+ }
+ }
+ }
+ return rv;
+ }
+
+ function map(array, callable, thisObj)
+ {
+ var rv = [];
+ rv.length = array.length;
+ for (var i=0; i<array.length; i++)
+ {
+ if (array.hasOwnProperty(i))
+ {
+ rv[i] = callable.call(thisObj, array[i], i, array);
+ }
+ }
+ return rv;
+ }
+
+ function extend(array, items)
+ {
+ Array.prototype.push.apply(array, items);
+ }
+
+ function forEach (array, callback, thisObj)
+ {
+ for (var i=0; i<array.length; i++)
+ {
+ if (array.hasOwnProperty(i))
+ {
+ callback.call(thisObj, array[i], i, array);
+ }
+ }
+ }
+
+ function merge(a,b)
+ {
+ var rv = {};
+ var p;
+ for (p in a)
+ {
+ rv[p] = a[p];
+ }
+ for (p in b) {
+ rv[p] = b[p];
+ }
+ return rv;
+ }
+
+ function expose(object, name)
+ {
+ var components = name.split(".");
+ var target = window;
+ for (var i=0; i<components.length - 1; i++)
+ {
+ if (!(components[i] in target))
+ {
+ target[components[i]] = {};
+ }
+ target = target[components[i]];
+ }
+ target[components[components.length - 1]] = object;
+ }
+
+ function forEach_windows(callback) {
+ // Iterate of the the windows [self ... top, opener]. The callback is passed
+ // two objects, the first one is the windows object itself, the second one
+ // is a boolean indicating whether or not its on the same origin as the
+ // current window.
+ var cache = forEach_windows.result_cache;
+ if (!cache) {
+ cache = [[self, true]];
+ var w = self;
+ var i = 0;
+ var so;
+ var origins = location.ancestorOrigins;
+ while (w != w.parent)
+ {
+ w = w.parent;
+ // In WebKit, calls to parent windows' properties that aren't on the same
+ // origin cause an error message to be displayed in the error console but
+ // don't throw an exception. This is a deviation from the current HTML5
+ // spec. See: https://bugs.webkit.org/show_bug.cgi?id=43504
+ // The problem with WebKit's behavior is that it pollutes the error console
+ // with error messages that can't be caught.
+ //
+ // This issue can be mitigated by relying on the (for now) proprietary
+ // `location.ancestorOrigins` property which returns an ordered list of
+ // the origins of enclosing windows. See:
+ // http://trac.webkit.org/changeset/113945.
+ if(origins) {
+ so = (location.origin == origins[i]);
+ }
+ else
+ {
+ so = is_same_origin(w);
+ }
+ cache.push([w, so]);
+ i++;
+ }
+ w = window.opener;
+ if(w)
+ {
+ // window.opener isn't included in the `location.ancestorOrigins` prop.
+ // We'll just have to deal with a simple check and an error msg on WebKit
+ // browsers in this case.
+ cache.push([w, is_same_origin(w)]);
+ }
+ forEach_windows.result_cache = cache;
+ }
+
+ forEach(cache,
+ function(a)
+ {
+ callback.apply(null, a);
+ });
+ }
+
+ function is_same_origin(w) {
+ try {
+ 'random_prop' in w;
+ return true;
+ } catch(e) {
+ return false;
+ }
+ }
+
+ function supports_post_message(w)
+ {
+ var supports;
+ var type;
+ // Given IE implements postMessage across nested iframes but not across
+ // windows or tabs, you can't infer cross-origin communication from the presence
+ // of postMessage on the current window object only.
+ //
+ // Touching the postMessage prop on a window can throw if the window is
+ // not from the same origin AND post message is not supported in that
+ // browser. So just doing an existence test here won't do, you also need
+ // to wrap it in a try..cacth block.
+ try
+ {
+ type = typeof w.postMessage;
+ if (type === "function")
+ {
+ supports = true;
+ }
+ // IE8 supports postMessage, but implements it as a host object which
+ // returns "object" as its `typeof`.
+ else if (type === "object")
+ {
+ supports = true;
+ }
+ // This is the case where postMessage isn't supported AND accessing a
+ // window property across origins does NOT throw (e.g. old Safari browser).
+ else
+ {
+ supports = false;
+ }
+ }
+ catch(e) {
+ // This is the case where postMessage isn't supported AND accessing a
+ // window property across origins throws (e.g. old Firefox browser).
+ supports = false;
+ }
+ return supports;
+ }
+})();
+
+/*
+ *For blacklist
+ */
+
+function is_platform_supported(name)
+{
+ var ret = true;
+
+ if (not_support_list.indexOf(name) >= 0)
+ ret = false;
+
+ return ret;
+}
+
+// vim: set expandtab shiftwidth=4 tabstop=4:
--- /dev/null
+/*
+ * This file is intended for vendors to implement
+ * code needed to integrate testharness.js tests with their own test systems.
+ *
+ * The default implementation extracts metadata from the tests and validates
+ * it against the cached version that should be present in the test source
+ * file. If the cache is not found or is out of sync, source code suitable for
+ * caching the metadata is optionally generated.
+ *
+ * The cached metadata is present for extraction by test processing tools that
+ * are unable to execute javascript.
+ *
+ * Metadata is attached to tests via the properties parameter in the test
+ * constructor. See testharness.js for details.
+ *
+ * Typically test system integration will attach callbacks when each test has
+ * run, using add_result_callback(callback(test)), or when the whole test file
+ * has completed, using
+ * add_completion_callback(callback(tests, harness_status)).
+ *
+ * For more documentation about the callback functions and the
+ * parameters they are called with see testharness.js
+ */
+
+
+
+var metadata_generator = {
+
+ currentMetadata: {},
+ cachedMetadata: false,
+ metadataProperties: ['help', 'assert', 'author'],
+
+ error: function(message) {
+ var messageElement = document.createElement('p');
+ messageElement.setAttribute('class', 'error');
+ this.appendText(messageElement, message);
+
+ var summary = document.getElementById('summary');
+ if (summary) {
+ summary.parentNode.insertBefore(messageElement, summary);
+ }
+ else {
+ document.body.appendChild(messageElement);
+ }
+ },
+
+ /**
+ * Ensure property value has contact information
+ */
+ validateContact: function(test, propertyName) {
+ var result = true;
+ var value = test.properties[propertyName];
+ var values = Array.isArray(value) ? value : [value];
+ for (var index = 0; index < values.length; index++) {
+ value = values[index];
+ var re = /(\S+)(\s*)<(.*)>(.*)/;
+ if (! re.test(value)) {
+ re = /(\S+)(\s+)(http[s]?:\/\/)(.*)/
+ if (! re.test(value)) {
+ this.error('Metadata property "' + propertyName +
+ '" for test: "' + test.name +
+ '" must have name and contact information ' +
+ '("name <email>" or "name http(s)://")');
+ result = false;
+ }
+ }
+ }
+ return result;
+ },
+
+ /**
+ * Extract metadata from test object
+ */
+ extractFromTest: function(test) {
+ var testMetadata = {};
+ // filter out metadata from other properties in test
+ for (var metaIndex = 0; metaIndex < this.metadataProperties.length;
+ metaIndex++) {
+ var meta = this.metadataProperties[metaIndex];
+ if (test.properties.hasOwnProperty(meta)) {
+ if ('author' == meta) {
+ this.validateContact(test, meta);
+ }
+ testMetadata[meta] = test.properties[meta];
+ }
+ }
+ return testMetadata;
+ },
+
+ /**
+ * Compare cached metadata to extracted metadata
+ */
+ validateCache: function() {
+ for (var testName in this.currentMetadata) {
+ if (! this.cachedMetadata.hasOwnProperty(testName)) {
+ return false;
+ }
+ var testMetadata = this.currentMetadata[testName];
+ var cachedTestMetadata = this.cachedMetadata[testName];
+ delete this.cachedMetadata[testName];
+
+ for (var metaIndex = 0; metaIndex < this.metadataProperties.length;
+ metaIndex++) {
+ var meta = this.metadataProperties[metaIndex];
+ if (cachedTestMetadata.hasOwnProperty(meta) &&
+ testMetadata.hasOwnProperty(meta)) {
+ if (Array.isArray(cachedTestMetadata[meta])) {
+ if (! Array.isArray(testMetadata[meta])) {
+ return false;
+ }
+ if (cachedTestMetadata[meta].length ==
+ testMetadata[meta].length) {
+ for (var index = 0;
+ index < cachedTestMetadata[meta].length;
+ index++) {
+ if (cachedTestMetadata[meta][index] !=
+ testMetadata[meta][index]) {
+ return false;
+ }
+ }
+ }
+ else {
+ return false;
+ }
+ }
+ else {
+ if (Array.isArray(testMetadata[meta])) {
+ return false;
+ }
+ if (cachedTestMetadata[meta] != testMetadata[meta]) {
+ return false;
+ }
+ }
+ }
+ else if (cachedTestMetadata.hasOwnProperty(meta) ||
+ testMetadata.hasOwnProperty(meta)) {
+ return false;
+ }
+ }
+ }
+ for (var testName in this.cachedMetadata) {
+ return false;
+ }
+ return true;
+ },
+
+ appendText: function(elemement, text) {
+ elemement.appendChild(document.createTextNode(text));
+ },
+
+ jsonifyArray: function(arrayValue, indent) {
+ var output = '[';
+
+ if (1 == arrayValue.length) {
+ output += JSON.stringify(arrayValue[0]);
+ }
+ else {
+ for (var index = 0; index < arrayValue.length; index++) {
+ if (0 < index) {
+ output += ',\n ' + indent;
+ }
+ output += JSON.stringify(arrayValue[index]);
+ }
+ }
+ output += ']';
+ return output;
+ },
+
+ jsonifyObject: function(objectValue, indent) {
+ var output = '{';
+
+ var count = 0;
+ for (var property in objectValue) {
+ ++count;
+ if (Array.isArray(objectValue[property]) ||
+ ('object' == typeof(value))) {
+ ++count;
+ }
+ }
+ if (1 == count) {
+ for (var property in objectValue) {
+ output += ' "' + property + '": '
+ + JSON.stringify(objectValue[property])
+ + ' ';
+ }
+ }
+ else {
+ var first = true;
+ for (var property in objectValue) {
+ if (! first) {
+ output += ',';
+ }
+ first = false;
+ output += '\n ' + indent + '"' + property + '": ';
+ var value = objectValue[property];
+ if (Array.isArray(value)) {
+ output += this.jsonifyArray(value, indent +
+ ' '.substr(0, 5 + property.length));
+ }
+ else if ('object' == typeof(value)) {
+ output += this.jsonifyObject(value, indent + ' ');
+ }
+ else {
+ output += JSON.stringify(value);
+ }
+ }
+ if (1 < output.length) {
+ output += '\n' + indent;
+ }
+ }
+ output += '}';
+ return output;
+ },
+
+ /**
+ * Generate javascript source code for captured metadata
+ * Metadata is in pretty-printed JSON format
+ */
+ generateSource: function() {
+ var source =
+ '<script id="metadata_cache">/*\n' +
+ this.jsonifyObject(this.currentMetadata, '') + '\n' +
+ '*/</script>\n';
+ return source;
+ },
+
+ /**
+ * Add element containing metadata source code
+ */
+ addSourceElement: function(event) {
+ var sourceWrapper = document.createElement('div');
+ sourceWrapper.setAttribute('id', 'metadata_source');
+
+ var instructions = document.createElement('p');
+ if (this.cachedMetadata) {
+ this.appendText(instructions,
+ 'Replace the existing <script id="metadata_cache"> element ' +
+ 'in the test\'s <head> with the following:');
+ }
+ else {
+ this.appendText(instructions,
+ 'Copy the following into the <head> element of the test ' +
+ 'or the test\'s metadata sidecar file:');
+ }
+ sourceWrapper.appendChild(instructions);
+
+ var sourceElement = document.createElement('pre');
+ this.appendText(sourceElement, this.generateSource());
+
+ sourceWrapper.appendChild(sourceElement);
+
+ var messageElement = document.getElementById('metadata_issue');
+ messageElement.parentNode.insertBefore(sourceWrapper,
+ messageElement.nextSibling);
+ messageElement.parentNode.removeChild(messageElement);
+
+ (event.preventDefault) ? event.preventDefault() :
+ event.returnValue = false;
+ },
+
+ /**
+ * Extract the metadata cache from the cache element if present
+ */
+ getCachedMetadata: function() {
+ var cacheElement = document.getElementById('metadata_cache');
+
+ if (cacheElement) {
+ var cacheText = cacheElement.firstChild.nodeValue;
+ var openBrace = cacheText.indexOf('{');
+ var closeBrace = cacheText.lastIndexOf('}');
+ if ((-1 < openBrace) && (-1 < closeBrace)) {
+ cacheText = cacheText.slice(openBrace, closeBrace + 1);
+ try {
+ this.cachedMetadata = JSON.parse(cacheText);
+ }
+ catch (exc) {
+ this.cachedMetadata = 'Invalid JSON in Cached metadata. ';
+ }
+ }
+ else {
+ this.cachedMetadata = 'Metadata not found in cache element. ';
+ }
+ }
+ },
+
+ /**
+ * Main entry point, extract metadata from tests, compare to cached version
+ * if present.
+ * If cache not present or differs from extrated metadata, generate an error
+ */
+ process: function(tests, harness_status) {
+ for (var index = 0; index < tests.length; index++) {
+ var test = tests[index];
+ if (this.currentMetadata.hasOwnProperty(test.name)) {
+ this.error('Duplicate test name: ' + test.name);
+ }
+ else {
+ this.currentMetadata[test.name] = this.extractFromTest(test);
+ }
+ }
+
+ this.getCachedMetadata();
+
+ var message = null;
+ var messageClass = 'warning';
+ var showSource = false;
+
+ if (0 == tests.length) {
+ if (this.cachedMetadata) {
+ message = 'Cached metadata present but no tests. ';
+ }
+ }
+ else if (1 == tests.length) {
+ if (this.cachedMetadata) {
+ message = 'Single test files should not have cached metadata. ';
+ }
+ else {
+ var testMetadata = this.currentMetadata[tests[0].name];
+ var hasMetadata = false;
+ for (var meta in testMetadata) {
+ hasMetadata |= testMetadata.hasOwnProperty(meta);
+ }
+ if (hasMetadata) {
+ message = 'Single tests should not have metadata. ' +
+ 'Move metadata to <head>. ';
+ }
+ }
+ }
+ else {
+ if (this.cachedMetadata) {
+ messageClass = 'error';
+ if ('string' == typeof(this.cachedMetadata)) {
+ message = this.cachedMetadata;
+ showSource = true;
+ }
+ else if (! this.validateCache()) {
+ message = 'Cached metadata out of sync. ';
+ showSource = true;
+ }
+ }
+ }
+
+ if (message) {
+ var messageElement = document.createElement('p');
+ messageElement.setAttribute('id', 'metadata_issue');
+ messageElement.setAttribute('class', messageClass);
+ this.appendText(messageElement, message);
+
+ if (showSource) {
+ var link = document.createElement('a');
+ this.appendText(link, 'Click for source code.');
+ link.setAttribute('href', '#');
+ link.setAttribute('onclick',
+ 'metadata_generator.addSourceElement(event)');
+ messageElement.appendChild(link);
+ }
+
+ var summary = document.getElementById('summary');
+ if (summary) {
+ summary.parentNode.insertBefore(messageElement, summary);
+ }
+ else {
+ var log = document.getElementById('log');
+ if (log) {
+ log.appendChild(messageElement);
+ }
+ }
+ }
+ },
+
+ setup: function() {
+ add_completion_callback(
+ function (tests, harness_status) {
+ metadata_generator.process(tests, harness_status)
+ });
+ }
+}
+
+metadata_generator.setup();
+// vim: set expandtab shiftwidth=4 tabstop=4:
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<test_definition>
+ <suite name="webapi-w3c-fileapi-tests" launcher="WRTLauncher">
+ <set name="FileAPI">
+ <testcase purpose="Check if example of handling progress conditions" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="File_example_handle_progress">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of handling progress conditions</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_example_handle_progress.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>In the example below, different code blocks handle progress, error, and success conditions</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if example of handling error conditions" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="File_example_error_progress">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of handling error conditions</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_example_error_progress.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>In the example below, different code blocks handle progress, error, and success conditions</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if example of handling success conditions" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="File_example_success_progress">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of handling success conditions</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_example_success_progress.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>In the example below, different code blocks handle progress, error, and success conditions</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileList.item has no argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileList.item has no argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileList.item returns a File object in the FileList when the value of argument index is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_index_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileList.item returns a File object in the FileList when the value of argument index is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_index_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileList.item returns the last File object in the FileList when the value of argument index is one less than the number of File objects" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_index_max">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileList.item returns the last File object in the FileList when the value of argument index is one less than the number of File objects</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_index_max.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if example of using DOM access to the file element within a form" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileList_example_access_file_element">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of using DOM access to the file element within a form</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_example_access_file_element.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filelist</spec_url>
+ <spec_statement>Sample usage typically involves DOM access to the <input type=”file”> element within a form, and then accessing selected files</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if Blob.size is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="Blob_size_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if Blob.size is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if Blob.size is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_size_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if Blob.size is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if Blob.type is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="Blob_type_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if Blob.type is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_type_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="type" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if Blob.slice is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="Blob_slice_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if Blob.slice is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the relativeStart is max((size + start), 0)) when the start prameter is negative" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="Blob_slice_start_negative">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the relativeStart is max((size + start), 0)) when the start prameter is negative</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_start_negative.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob</spec_url>
+ <spec_statement>If start is negative, let relativeStart be max((size + start), 0))</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the relativeEnd is max((size + end), 0) when the end parameter is negative" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="Blob_slice_end_negative">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the relativeEnd is max((size + end), 0) when the end parameter is negative</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_end_negative.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob</spec_url>
+ <spec_statement>If end is negative, let relativeEnd be max((size + end), 0)</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the relativeContentType be set to the empty string when the contentType parameter is not provided" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="Blob_slice_no_contentType">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the relativeContentType be set to the empty string when the contentType parameter is not provided</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_no_contentType.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob</spec_url>
+ <spec_statement>If the contentType parameter is not provided, let relativeContentType be set to the empty string</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the relativeContentType be set to the empty string when the contentType parameter is undefined" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="Blob_slice_contentType_undefined">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the relativeContentType be set to the empty string when the contentType parameter is undefined</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_contentType_undefined.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob</spec_url>
+ <spec_statement>If the contentType parameter is undefined, let relativeContentType be set to the empty string</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the contentType parameter has a normal value that expecting a new Blob object is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_slice_contentType_normal">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the contentType parameter has a normal value that expecting a new Blob object is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_contentType_normal.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if example of illustrating the different types of slice calls possible" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="Blob_example_call_slice">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of illustrating the different types of slice calls possible</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_example_call_slice.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-Blob</spec_url>
+ <spec_statement>The examples below illustrate the different types of slice calls possible</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if File.name is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="File_name_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if File.name is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_name_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-name</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if File.name is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="File_name_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if File.name is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_name_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-name</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if File.lastModifiedDate is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="File_lastModifiedDate_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if File.lastModifiedDate is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-lastModifiedDate</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the File interface inherits from Blob interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="File_inherits_blob">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the File interface inherits from Blob interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_inherits_blob.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-file</spec_url>
+ <spec_statement>The File interface inherits from this interface</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsArrayBuffer is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_readAsArrayBuffer_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsArrayBuffer is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsArrayBuffer throw an InvalidStateError exception when the readyState is LOADING" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsArrayBuffer_exception_InvalidStateError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsArrayBuffer throw an InvalidStateError exception when the readyState is LOADING</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_exception_InvalidStateError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = LOADING throw an InvalidStateError exception [DOMCore] and terminate these steps</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsArrayBuffer occurs an error that expecting readyState is to be set DONE and result to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsArrayBuffer_occur_error">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsArrayBuffer occurs an error that expecting readyState is to be set DONE and result to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_occur_error.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If an error occurs during reading the blob parameter, set readyState to DONE and set result to null</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsBinaryString is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_readAsBinaryString_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsBinaryString is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsBinaryString throw an InvalidStateError exception when the readyState is LOADING" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsBinaryString_exception_InvalidStateError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsBinaryString throw an InvalidStateError exception when the readyState is LOADING</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_exception_InvalidStateError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = LOADING throw an InvalidStateError exception [DOMCore] and terminate this algorithm</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsBinaryString occurs an error that expecting readyState is to be set DONE and result to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsBinaryString_occur_error">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsBinaryString occurs an error that expecting readyState is to be set DONE and result to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_occur_error.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If an error occurs during reading of the blob parameter, set readyState to DONE and set result to null</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the user agent must return a new FileReader object when the FileReader() constructor is invoked" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="FileReader_constructor_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the user agent must return a new FileReader object when the FileReader() constructor is invoked</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>When the FileReader() constructor is invoked, the user agent MUST return a new FileReader object</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader's constructor must be available when in environments where the global object is represented by a WorkerGlobalScope object" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="FileReader_constructor_in_worker">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader's constructor must be available when in environments where the global object is represented by a WorkerGlobalScope object</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_constructor_in_worker.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>In environments where the global object is represented by a Window or a WorkerGlobalScope object, the FileReader constructor MUST be available object</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsText is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_readAsText_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsText is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsText throw an InvalidStateError exception when the readyState is LOADING" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsText_exception_InvalidStateError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsText throw an InvalidStateError exception when the readyState is LOADING</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_exception_InvalidStateError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = LOADING throw an InvalidStateError [DOMCore] and terminate these steps</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsText occurs an error that expecting readyState is to be set DONE and result to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsText_occur_error">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsText occurs an error that expecting readyState is to be set DONE and result to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_occur_error.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If an error occurs during reading the blob parameter, set readyState to DONE and set result to null</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsText has a invalid encoding parameter that expecting read file successfully" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readAsText_invalid_encoding">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsText has a invalid encoding parameter that expecting read file successfully</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_invalid_encoding.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsDataURL is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_readAsDataURL_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsDataURL is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsDataURL throw an InvalidStateError exception when the readyState is LOADING" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsDataURL_exception_InvalidStateError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsDataURL throw an InvalidStateError exception when the readyState is LOADING</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_exception_InvalidStateError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = LOADING throw an InvalidStateError exception [DOMCore] and terminate this algorithm</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readAsDataURL occurs an error that expecting readyState is to be set DONE and result to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_readAsDataURL_occur_error">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readAsDataURL occurs an error that expecting readyState is to be set DONE and result to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_occur_error.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If an error occurs during reading of the blob parameter, OR if a user agent's URL length limitations prevent returning data as a Data URL [DataURL], set readyState to DONE and set result to null</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.abort is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_abort_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.abort is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_abort_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="abort" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-abort</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.abort is called when readyState is EMPTY that expecting FileReader.result is to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="FileReader_abort_when_readyState_EMPTY">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.abort is called when readyState is EMPTY that expecting FileReader.result is to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_EMPTY.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = EMPTY or if readyState = DONE set result to null and terminate this overall set of steps without doing anything else</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.abort is called when readyState is DONE that expecting FileReader.result is to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_abort_when_readyState_DONE">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.abort is called when readyState is DONE that expecting FileReader.result is to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_abort_when_readyState_DONE.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If readyState = EMPTY or if readyState = DONE set result to null and terminate this overall set of steps without doing anything else</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.EMPTY is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_EMPTY_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.EMPTY is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="EMPTY" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.EMPTY is of type number" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_EMPTY_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.EMPTY is of type number</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="EMPTY" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the value of constant FileReader.EMPTY is 0" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_EMPTY_value">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the value of constant FileReader.EMPTY is 0</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_EMPTY_value.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="EMPTY" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-empty</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.LOADING is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_LOADING_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.LOADING is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="LOADING" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.LOADING is of type number" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_LOADING_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.LOADING is of type number</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="LOADING" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the value of constant FileReader.EMPTY is 1" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_LOADING_value">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the value of constant FileReader.EMPTY is 1</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_LOADING_value.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="LOADING" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-loading</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.DONE is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_DONE_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.DONE is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="DONE" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the constant FileReader.DONE is of type number" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_DONE_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the constant FileReader.DONE is of type number</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="DONE" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the value of constant FileReader.DONE is 2" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_DONE_value">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the value of constant FileReader.DONE is 2</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_DONE_value.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="DONE" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-done</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readyState is of type number" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readyState_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readyState is of type number</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.readyState is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readyState_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.readyState is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_result_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="result" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result return null when an error in reading the File or Blob has occurred" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_result_when_occur_error">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result return null when an error in reading the File or Blob has occurred</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_occur_error.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>if an error in reading the File or Blob has occurred (using any read method), then the result attribute MUST return null</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result return a DOMString that is a Data URL [DataURL] encoding of the File or Blob's data when the readAsDataURL read method is used" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_result_call_readAsDataURL">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result return a DOMString that is a Data URL [DataURL] encoding of the File or Blob's data when the readAsDataURL read method is used</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsDataURL.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>if the readAsDataURL read method is used, the result attribute MUST return a DOMString that is a Data URL [DataURL] encoding of the File or Blob's data</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result return a DOMString representing the File or Blob's data as a binary string when the readAsBinaryString read method is called and no error in reading the File or Blob has occurred" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_result_call_readAsBinaryString">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result return a DOMString representing the File or Blob's data as a binary string when the readAsBinaryString read method is called and no error in reading the File or Blob has occurred</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsBinaryString.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>if the readAsBinaryString read method is called and no error in reading the File or Blob has occurred, then the result attribute MUST return a DOMString representing the File or Blob's data as a binary string</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result return a string representing the File or Blob's data as a text string when the readAsText read method is called and no error in reading the File or Blob has occurred" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_result_call_readAsText">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result return a string representing the File or Blob's data as a text string when the readAsText read method is called and no error in reading the File or Blob has occurred</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsText.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>if the readAsText read method is called and no error in reading the File or Blob has occurred, then the result attribute MUST return a string representing the File or Blob's data as a text string</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.result return an ArrayBuffer [TypedArrays] object when the readAsArrayBuffer read method is called and no error in reading the File or Blob has occurred" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_result_call_readAsArrayBuffer">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.result return an ArrayBuffer [TypedArrays] object when the readAsArrayBuffer read method is called and no error in reading the File or Blob has occurred</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_call_readAsArrayBuffer.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>if the readAsText read method is called and no error in reading the File or Blob has occurred, then the result attribute MUST return a string representing the File or Blob's data as a text string</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.error is of DOMError object type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_error_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.error is of DOMError object type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="error" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.error is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_error_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.error is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="error" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the progress event e does not bubble or e.bubbles MUST be false" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_event_bubbles_false">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the progress event e does not bubble or e.bubbles MUST be false</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_event_bubbles_false.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>The progress event e does not bubble. e.bubbles MUST be false</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the progress event e is NOT cancelable or e.cancelable MUST be false" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_event_cancelable_false">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the progress event e is NOT cancelable or e.cancelable MUST be false</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_event_cancelable_false.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>The progress event e is NOT cancelable. e.cancelable MUST be false</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.error return a 'SecurityError' DOMError when certain files are unsafe for access within a Web application" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="FileReader_error_SecurityError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.error return a 'SecurityError' DOMError when certain files are unsafe for access within a Web application</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_SecurityError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>If it is determined that the file has changed on disk since the user selected it then for asynchronous read methods the error attribute MAY return a SecurityError" DOMError"</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReaderSync_readAsArrayBuffer_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReaderSync_readAsBinaryString_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReaderSync_readAsText_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReaderSync_readAsDataURL_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the user agent MUST return a new FileReaderSync object when the FileReaderSync() constructor is invoked" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="FileReaderSync_constructor_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the user agent MUST return a new FileReaderSync object when the FileReaderSync() constructor is invoked</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_constructor_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement>When the FileReaderSync() constructor is invoked, the user agent MUST return a new FileReaderSync object</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if WorkerUtils implements URL" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="URL_in_webworker">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if WorkerUtils implements URL</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_in_webworker.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#URL-object</spec_url>
+ <spec_statement>WorkerUtils implements URL</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.createObjectURL is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="URL_createObjectURL_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.createObjectURL is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="createObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.createObjectURL returns null when this method is called with a Blob argument that is NOT valid" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="URL_createObjectURL_blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.createObjectURL returns null when this method is called with a Blob argument that is NOT valid</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="createObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.createObjectURL has a valid argument that expecting a unique Blob URI is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="URL_createObjectURL_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.createObjectURL has a valid argument that expecting a unique Blob URI is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="createObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.createObjectURL has no argument that expecting a exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="URL_createObjectURL_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.createObjectURL has no argument that expecting a exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_createObjectURL_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="createObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-createObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if example of obaining a reference to a Blob object" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P3" id="URL_example_obtain_blob_object">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if example of obaining a reference to a Blob object</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_example_obtain_blob_object.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#URL-object</spec_url>
+ <spec_statement>In the example below, after obaining a reference to a Blob object, the static method URL.createObjectURL is called on that Blob object</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.revokeObjectURL is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="URL_revokeObjectURL_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.revokeObjectURL is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="revokeObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.revokeObjectURL has no argument that expecting a exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="URL_revokeObjectURL_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.revokeObjectURL has no argument that expecting a exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="revokeObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if URL.revokeObjectURL call does nothing and user agents MAY display a message on the error console when the url refers to a Blob that is NOT valid" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="URL_revokeObjectURL_url_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if URL.revokeObjectURL call does nothing and user agents MAY display a message on the error console when the url refers to a Blob that is NOT valid</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/URL_revokeObjectURL_url_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="revokeObjectURL" interface="URL" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-revokeObjectURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the attribute of the interface Blob size is not null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_size_is_not_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check the attribute of the interface Blob size is not null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_is_not_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute size value of interface Blob,when the upload empty file,return 0" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_size_return_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute size value of interface Blob,when the upload empty file,return 0</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_return_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check the attribute of the interface Blob size is number type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_size_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check the attribute of the interface Blob size is number type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob set no parameter" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_slice_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob set no parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob return blob" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_slice_return_blob">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob return blob</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_return_blob.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 2 and end to 5" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="Blob_slice_two_five">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 2 and end to 5</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_two_five.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob return type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_slice_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob return type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 0 and end to 10" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="Blob_slice_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 0 and end to 10</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 0 and end to 5" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="Blob_slice_zero_five">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob,when processing the slice call,user agents must normalize start to 0 and end to 5</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero_five.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 0 and end to size" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="Blob_slice_zero_size">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 0 and end to size</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_zero_size.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute type value of interface Blob return the media type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_type_normal">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute type value of interface Blob return the media type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_type_normal.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="type" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute type value of interface Blob is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_type_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute type value of interface Blob is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_type_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="type" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute type value of interface Blob return empty string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_type_return_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute type value of interface Blob return empty string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_type_return_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="type" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute type value of interface Blob is string type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="Blob_type_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute type value of interface Blob is string type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_type_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="type" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-type</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute item value of interface FileList is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileList_item_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute item value of interface FileList is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method item of interface FileList set -3" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_index_negative">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method item of interface FileList set -3</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_index_negative.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method item of interface FileList set 0" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_index_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method item of interface FileList set 0</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_index_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method item of interface FileList set 3" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_large_number">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method item of interface FileList set 3</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_large_number.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileList.item has a valid argument that expecting a File object is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_item_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileList.item has a valid argument that expecting a File object is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method item of interface FileList has no file will return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileList_item_no_file">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method item of interface FileList has no file will return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_item_no_file.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="item" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-item</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute length value of interface FileList" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="FileList_length_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute length value of interface FileList</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_length_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="length" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute length value of interface FileList is exist" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileList_length_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute length value of interface FileList is exist</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_length_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="length" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute length value of interface FileList is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_length_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute length value of interface FileList is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_length_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="length" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute length value of interface FileList return type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileList_length_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute length value of interface FileList return type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_length_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="length" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute length value of interface FileList return 0" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileList_length_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute length value of interface FileList return 0</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileList_length_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="length" interface="FileList" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-length</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is invalid" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is invalid</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is empty string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is empty string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer has no argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer has no argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer has a valid argument that expecting the data contents of blob as an ArrayBuffer is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_return_arraybuffer">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer has a valid argument that expecting the data contents of blob as an ArrayBuffer is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_arraybuffer.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the return value of FileReaderSync.readAsArrayBuffer is of ArrayBuffer object type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_return_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the return value of FileReaderSync.readAsArrayBuffer is of ArrayBuffer object type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_set_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsArrayBuffer throws an exception when the argument is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_set_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBufferSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString has a invalid argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString has a invalid argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString throws an exception when the argument is empty string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString throws an exception when the argument is empty string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString has no argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString has no argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString has a valid argument that expecting the data contents of blob as an binary string is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_return_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString has a valid argument that expecting the data contents of blob as an binary string is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the return value of FileReaderSync.readAsBinaryString is of type string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_return_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the return value of FileReaderSync.readAsBinaryString is of type string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsBinaryString throws an exception when the argument is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_set_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsBinaryString throws an exception when the argument is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_set_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL throws an exception when the argument is invalid" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL throws an exception when the argument is invalid</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL throws an exception when the argument is empty string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL throws an exception when the argument is empty string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL has no argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL has no argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL has a valid argument that expecting the data contents of blob as a Data URL is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_return_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL has a valid argument that expecting the data contents of blob as a Data URL is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the return value of FileReaderSync.readAsDataURL is of type string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_return_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the return value of FileReaderSync.readAsDataURL is of type string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsDataURL throws an exception when the argument is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_set_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsDataURL throws an exception when the argument is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_set_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText throws an exception when the argument is invalid" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText throws an exception when the argument is invalid</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText throws an exception when the argument is empty string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText throws an exception when the argument is empty string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText has no argument that expecting an exception is to be thrown" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText has no argument that expecting an exception is to be thrown</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText has a valid argument that expecting the data contents of blob using the encoding determination algorithm is to be returned" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_return_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText has a valid argument that expecting the data contents of blob using the encoding determination algorithm is to be returned</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the return value of FileReaderSync.readAsText is of type string" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_return_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the return value of FileReaderSync.readAsText is of type string</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_return_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReaderSync.readAsText throws an exception when the argument is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_set_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReaderSync.readAsText throws an exception when the argument is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_set_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method abort value of FileReader interface,when the abort() method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="FileReader_abort_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method abort value of FileReader interface,when the abort() method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_abort_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="abort" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute error value of FileReader interface,the error attribute of the FileReader object MUST return a DOMError object,if there has been an error" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_error_attribute_DOMError">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute error value of FileReader interface,the error attribute of the FileReader object MUST return a DOMError object,if there has been an error</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_attribute_DOMError.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="error" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method error in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_error_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method error in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="error" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the attribute error value of FileReader interface return null." type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_error_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the attribute error value of FileReader interface return null.</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_error_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="error" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-error</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onabort in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onabort_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onabort in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onabort" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onabort value of FileReader interface return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onabort_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onabort value of FileReader interface return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onabort" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onabort value of FileReader interface,fire the event abort When the read has been aborted" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onabort_when_call_abort">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onabort value of FileReader interface,fire the event abort When the read has been aborted</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onabort_when_call_abort.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onabort" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onabort</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onerror in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onerror_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onerror in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onerror" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onerror value of FileReader interface return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onerror_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onerror value of FileReader interface return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onerror" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onerror value of FileReader interface,fire the event loadstart when the read has failed" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onerror_when_read_fail">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onerror value of FileReader interface,fire the event loadstart when the read has failed</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onerror_when_read_fail.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onerror" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onerror</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onloadend in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onloadend_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onloadend in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadend" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onloadend value of FileReader interface return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onloadend_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onloadend value of FileReader interface return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadend" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onloadend value of FileReader interface,fire the event loadend when the request has completed" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onloadend_when_read_completed">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onloadend value of FileReader interface,fire the event loadend when the request has completed</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadend_when_read_completed.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadend" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadend</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onloadstart in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onloadstart_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onloadstart in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadstart" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onloadstart value of FileReader interface return null." type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onloadstart_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onloadstart value of FileReader interface return null.</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadstart" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the attribute onloadstart value of FileReader interface,fire the event loadstart when the read starts" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onloadstart_when_read_start">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the attribute onloadstart value of FileReader interface,fire the event loadstart when the read starts</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onloadstart_when_read_start.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onloadstart" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onloadstart</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onload in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onload_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onload in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onload_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onload" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onload value of FileReader interface return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onload_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onload value of FileReader interface return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onload_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onload" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onload value of FileReader interface, fire the event loadstart when the read has successfully completed" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onload_when_read_completed">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onload value of FileReader interface, fire the event loadstart when the read has successfully completed</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onload_when_read_completed.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onload" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onload</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method onprogress in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_onprogress_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method onprogress in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onprogress" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onprogress value of FileReader interface return null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onprogress_return_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onprogress value of FileReader interface return null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_return_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onprogress" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute onprogress value of FileReader interface,fire the event loadstart While reading (and decoding) blob, and reporting partial Blob data" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_onprogress_when_reading">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute onprogress value of FileReader interface,fire the event loadstart While reading (and decoding) blob, and reporting partial Blob data</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_onprogress_when_reading.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="eventhandler" element_name="onprogress" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-onprogress</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsArrayBuffer value of FileReader interface set invalid value blo has error" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsArrayBuffer_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsArrayBuffer value of FileReader interface set invalid value blo has error</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsArrayBuffer value of FileReader interface set empty string will Normal execution" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsArrayBuffer_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsArrayBuffer value of FileReader interface set empty string will Normal execution</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsArrayBuffer value of FileReader interface is not Parameter" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsArrayBuffer_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsArrayBuffer value of FileReader interface is not Parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsArrayBuffer value of FileReader interface set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsArrayBuffer_set_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsArrayBuffer value of FileReader interface set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_set_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsArrayBuffer value of FileReader interface,When the readAsArrayBuffer(blob) method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readAsArrayBuffer_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsArrayBuffer value of FileReader interface,When the readAsArrayBuffer(blob) method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsArrayBuffer_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsArrayBuffer</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsBinaryString value of FileReader interface set blo" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsBinaryString_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsBinaryString value of FileReader interface set blo</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsBinaryString value of FileReader interface set empty string will Normal execution" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsBinaryString_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsBinaryString value of FileReader interface set empty string will Normal execution</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the method readAsBinaryString value of FileReader interface is not Parameter" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsBinaryString_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the method readAsBinaryString value of FileReader interface is not Parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsBinaryString value of FileReader interface set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsBinaryString_set_blob_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsBinaryString value of FileReader interface set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_set_blob_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsBinaryString value of FileReader interface,when the readAsBinaryString(blob) method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readAsBinaryString_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsBinaryString value of FileReader interface,when the readAsBinaryString(blob) method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsBinaryString_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringAsync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsDataURL value of FileReader interface set blo" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsDataURL_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsDataURL value of FileReader interface set blo</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsDataURL value of FileReader interface set empty string will Normal execution" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsDataURL_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsDataURL value of FileReader interface set empty string will Normal execution</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsDataURL of FileReader interface is not parameter" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsDataURL_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsDataURL of FileReader interface is not parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsDataURL value of FileReader interface set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsDataURL_set_blob_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsDataURL value of FileReader interface set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_set_blob_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the method readAsDataURL value of FileReader interface,When the readAsDataURL(blob) method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readAsDataURL_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the method readAsDataURL value of FileReader interface,When the readAsDataURL(blob) method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsDataURL_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURL</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface set blo" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsText_Blob_invalid">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface set blo</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_Blob_invalid.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface set empty string will Normal execution" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsText_empty_string">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface set empty string will Normal execution</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_empty_string.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface is not parameter" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsText_no_argument">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface is not parameter</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_no_argument.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsText_set_blob_null">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the method readAsText value of FileReader interface set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_readAsText_set_blob_null_optional">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the method readAsText value of FileReader interface set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_set_blob_null_optional.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface, When the readAsText method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="FileReader_readAsText_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface, When the readAsText method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readAsText value of FileReader interface, When the readAsText(blob, encoding) method is called" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readAsText_when_call_set_optional">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readAsText value of FileReader interface, When the readAsText(blob, encoding) method is called</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readAsText_when_call_set_optional.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsText</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method readyState in FileReader interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P1" id="FileReader_readyState_exist">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method readyState in FileReader interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute readyState value of FileReader interface,a File or Blob is being read" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readyState_one">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute readyState value of FileReader interface,a File or Blob is being read</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_one.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute readyState value of FileReader interface,the entire File or Blob has been read into memory" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readyState_two">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute readyState value of FileReader interface,the entire File or Blob has been read into memory</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_two.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="To check the attribute readyState value of FileReader interface,the FileReader object has been constructed, and there are no pending reads" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_readyState_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>To check the attribute readyState value of FileReader interface,the FileReader object has been constructed, and there are no pending reads</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_readyState_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="readyState" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readyState</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if FileReader.abort is called when readyState is LOADING that expecting FileReader.result is to be set null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_result_when_call_abort">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if FileReader.abort is called when readyState is LOADING that expecting FileReader.result is to be set null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_call_abort.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="result" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute result value of FileReader interface,if the readAsDataURL read method is used, the result attribute MUST return a DOMString" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="FileReader_result_when_readyState_two">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute result value of FileReader interface,if the readAsDataURL read method is used, the result attribute MUST return a DOMString</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_readyState_two.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="result" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the value of result is null when the readState is EMPTY" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_result_when_readyState_zero">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the value of result is null when the readState is EMPTY</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_when_readyState_zero.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="result" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute lastModifiedDate value of interface File return the last modified date" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="File_lastModifiedDate_normal">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute lastModifiedDate value of interface File return the last modified date</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_normal.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="lastModifiedDate" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute lastModifiedDate value of interface File is Date's instance" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="File_lastModifiedDate_is_Date">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute lastModifiedDate value of interface File is Date's instance</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_is_Date.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="lastModifiedDate" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute lastModifiedDate value of interface File is readonly" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="File_lastModifiedDate_readonly">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute lastModifiedDate value of interface File is readonly</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_readonly.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="lastModifiedDate" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute lastModifiedDate value of interface File is object type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="File_lastModifiedDate_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute lastModifiedDate value of interface File is object type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_lastModifiedDate_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="lastModifiedDate" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute name value of interface File return file name" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P1" id="File_name_normal">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute name value of interface File return file name</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_name_normal.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="name" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute name value of interface File of the type is string type" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="manual" priority="P2" id="File_name_type">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute name value of interface File of the type is string type</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/File_name_type.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="name" interface="File" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#file-attrs</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the attribute of the interface Blob size is not null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="Blob_size_normal">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the attribute of the interface Blob size is not null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_size_normal.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="size" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-size</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 1998 and end to 2999" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P0" id="Blob_slice_overflow">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the method slice value of interface Blob, when processing the slice call, user agents must normalize start to 1998 and end to 2999</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/Blob_slice_overflow.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="slice" interface="Blob" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-slice</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the construct of the interface FileReader" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P3" id="FileReader_construct">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the construct of the interface FileReader</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_construct.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion usage="true" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-filereader</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if the default value of FileReader.result is null" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReader_result_default_value">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if the default value of FileReader.result is null</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReader_result_default_value.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="attribute" element_name="result" interface="FileReader" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-result</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if obtain an ArrayBuffer object using the readAsArrayBuffer method by FileReaderSync interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsArrayBuffer_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if obtain an ArrayBuffer object using the readAsArrayBuffer method by FileReaderSync interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsArrayBuffer_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsArrayBuffer" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if read a blob text using readAsBinaryString method by FileReaderSync interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsBinaryString_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if read a blob text using readAsBinaryString method by FileReaderSync interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsBinaryString_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsBinaryString" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsBinaryStringSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if returns the data of blob as a Data URL by FileReaderSync interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsDataURL_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if returns the data of blob as a Data URL by FileReaderSync interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsDataURL_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsDataURL" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsDataURLSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if read a blob text using readAsText by FileReaderSync interface" type="compliance" status="approved" component="WebAPI/Storage/File API" execution_type="auto" priority="P2" id="FileReaderSync_readAsText_base">
+ <description>
+ <steps>
+ <step order="1">
+ <step_desc>Check if read a blob text using readAsText by FileReaderSync interface</step_desc>
+ <expected>Pass</expected>
+ </step>
+ </steps>
+ <test_script_entry>/opt/webapi-w3c-fileapi-tests/fileapi/FileReaderSync_readAsText_base.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion element_type="method" element_name="readAsText" interface="FileReaderSync" specification="File API" section="Storage" category="Tizen W3C API Specifications"/>
+ <spec_url>http://www.w3.org/TR/2011/WD-FileAPI-20111020/#dfn-readAsTextSync</spec_url>
+ <spec_statement/>
+ </spec>
+ </specs>
+ </testcase>
+ </set>
+ </suite>
+</test_definition>
+<!doctype html>
<!--
# Copyright (C) 2012 Intel Corporation
#
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Authors:
-# Zhang, Huihui <huihuix.zhang@intel.com>
-# Wendong,Sui <weidongx.sun@intel.com>
+# Wang, Jing <jing.j.wang@intel.com>
+# Tang, Shaofeng <shaofeng.tang@intel.com>
-->
-<!doctype html>
<head>
+<meta name="viewport" content="width=device-width">
<script src="jquery.js"></script>
<script>
var iTest = 0;
return sessionIdNode.innerHTML;
}
+ function close_window(){
+ //for webapi-nonw3c-webgl-tests run by tizen-tool emulator html,window.parent.close() no function,must call window.close, why?
+ if(window.parent != window.self){
+ window.open('','_self','');
+ window.close();
+ window.parent.onbeforeunload = null;
+ window.parent.close();
+ }
+ else{
+ window.open('','_self','');
+ window.close();
+ }
+ }
function start_test() {
try {
var task = ask_test_task();
} else if (task == -1) {
print_error_log("restart client process activated",
"this window will be closed in 2sec");
- setTimeout("window.open('','_self','');window.close()", 2000);
+ close_window();
+ //setTimeout("window.open('','_self','');window.close()", 2000);
} else if (task == null) {
print_error_log(
"get auto case failed, client will be restarted later",
"this window will be closed in 2sec");
- setTimeout("window.open('','_self','');window.close()", 2000);
+ close_window();
+ //setTimeout("window.open('','_self','');window.close()", 2000);
} else if (task != 0) {
var progress = check_execution_progress();
execute_test_task(task, progress);
print_error_log("ask_generate_xml", e);
}
});
- setTimeout("window.open('','_self','');window.close()", 2000);
+ close_window();
+ //setTimeout("window.open('','_self','');window.close()", winCloseTimeout);
}
function extract_all_manual() {
+ "</div><br/>Last Test Result:<div id=\"test_result_div\">"
+ json_progress.last_test_result + "</div>";
current_page_uri = json_task.entry;
+ case_id_str = json_task.case_id;
var index = current_page_uri.indexOf("?");
var test_page = "";
if (index >= 0)
if (i.toString() != value) {
continue;
}
- var rest = results[i].childNodes[0].innerText;
- var desc = results[i].childNodes[1].innerText;
- case_msg = results[i].childNodes[2].innerText;
+ var rest = results[i].childNodes[0].textContent;
+ var desc = results[i].childNodes[1].textContent;
+ case_msg = results[i].childNodes[2].textContent;
if (rest && rest.toUpperCase() == "PASS") {
result = "PASS";
} else {
print_error_log("memory collection process activated",
"this window will be closed in 2sec");
- setTimeout("window.open('','_self','');window.close()", 2000);
+ close_window();
+ //setTimeout("window.open('','_self','');window.close()", 2000);
}
}
tasks = extract_all_manual();
if (tasks != null){
for ( var i = 0; i < tasks.length; i++) {
- parent.document.getElementById("statusframe").height = 385 + "px";
- manualcaseslist[i] = new manual_cases();
- manualcaseslist[i].casesid = tasks[i].case_id;
- manualcaseslist[i].index = i;
- manualcaseslist[i].entry = tasks[i].entry;
- manualcaseslist[i].pre_con = tasks[i].pre_condition;
- manualcaseslist[i].post_con = tasks[i].post_condition;
- manualcaseslist[i].purpose = tasks[i].purpose;
-
- if (tasks[i].steps != undefined) {
- for ( var j = 0; j < tasks[i].steps.length; j++) {
- this_manual_step = new manual_test_step();
- this_manual_step.order = parseInt(tasks[i].steps[j].order);
- this_manual_step.desc = tasks[i].steps[j].step_desc;
- this_manual_step.expected = tasks[i].steps[j].expected;
- manualcaseslist[i].steps[this_manual_step.order - 1] = this_manual_step;
+ if (parent.document.getElementById("statusframe"))
+ parent.document.getElementById("statusframe").height = 385 + "px";
+ manualcaseslist[i] = new manual_cases();
+ manualcaseslist[i].casesid = tasks[i].case_id;
+ manualcaseslist[i].index = i;
+ manualcaseslist[i].entry = tasks[i].entry;
+ manualcaseslist[i].pre_con = tasks[i].pre_condition;
+ manualcaseslist[i].post_con = tasks[i].post_condition;
+ manualcaseslist[i].purpose = tasks[i].purpose;
+
+ if (tasks[i].steps != undefined) {
+ for ( var j = 0; j < tasks[i].steps.length; j++) {
+ this_manual_step = new manual_test_step();
+ this_manual_step.order = parseInt(tasks[i].steps[j].order);
+ this_manual_step.desc = tasks[i].steps[j].step_desc;
+ this_manual_step.expected = tasks[i].steps[j].expected;
+ manualcaseslist[i].steps[this_manual_step.order - 1] = this_manual_step;
+ }
}
}
- }
if (tasks.length > 0) {
statusFrame.src = "./manual_harness.html";
$($($('#main')).get(0)).attr('rows', "100,*");
- }
+ }
+ oTestFrame = document.getElementById('testframe');
+ oTestFrame.src = '';
}
else {
// No manual cases, generate the result.
ask_generate_xml();
}
- oTestFrame = document.getElementById('testframe');
- oTestFrame.src = '';
}
function commit_test_result(result, msg) {
url : server_url,
type : "POST",
data : {
+ "case_id" : case_id_str,
"purpose" : purpose_str,
"result" : result,
"msg" : "[Message]" + msg,
<body id="main" onload='precheck_init()'>
<iframe frameborder="1" height="30px" width="100%" id="messageframe"></iframe>
<iframe frameborder="1" height="30px" width="100%" id="statusframe"></iframe>
- <iframe frameborder="1" height="2500px" width="100%" id="testframe"></iframe>
+ <iframe frameborder="1" height="2500px" width="100%" id="testframe" allowFullScreen="true" mozAllowFullScreen="true" webkitAllowFullscreen="true"></iframe>
</body>
</html>
font-size: 20px;
}
input,lable,select{
- font-size: 40px;
+ font-size: 25px;
}
</style>
<script src="jquery.js"></script>
async: false,
url: server_url,
type: "POST",
- data: {"purpose": window.parent.manualcaseslist[iTestsManual].purpose, "result": iResult},
+ data: {"case_id": window.parent.manualcaseslist[iTestsManual].casesid,"purpose": window.parent.manualcaseslist[iTestsManual].purpose, "result": iResult},
dataType: "json",
beforeSend: function(x) {
if (x && x.overrideMimeType) {
<select id="caseslist" style="width:59%" onchange="listUpdate()">
</select>
<input type="button" style="width:13%" id="nextbutton" value="Next >" onclick="nextTest()"/>
-<input type="button" style="width:13%" id="runbutton" value="Run" onclick="runTest()"/>
+<input type="button" style="width:12%" id="runbutton" value="Run" onclick="runTest()"/>
</div>
<div width=100%>
-<textarea id="casesinfo" rows=11 disabled='disabled' />
+<textarea id="casesinfo" rows=8 disabled='disabled' />
</textarea>
</div>
<div style="width:100%;text-align:right;background-color:#cccccc;">
-<input type="radio" id="passradio" value="Pass" onclick="passRadio()"/><label style="font-size:40px" onclick="passLabel()">Pass</label>
+<input type="radio" id="passradio" value="Pass" onclick="passRadio()"/><label style="font-size:25px" onclick="passLabel()">Pass</label>
-<input type="radio" id="failradio" value="Fail" onclick="failRadio()"/><label style="font-size:40px" onclick="failLabel()">Fail</label>
+<input type="radio" id="failradio" value="Fail" onclick="failRadio()"/><label style="font-size:25px" onclick="failLabel()">Fail</label>
-<input type="radio" id="blockradio" value="Block" onclick="blockRadio()"/><label style="font-size:40px" onclick="blockLabel()">Block</label>
+<input type="radio" id="blockradio" value="Block" onclick="blockRadio()"/><label style="font-size:25px" onclick="blockLabel()">Block</label>
<input type="button" style="width:12%" id="submitbutton" value="Save" onclick="submitTest()"/>
<input type="button" style="width:12%" id="completebutton" value="Done" onclick="completeTest()"/><br>
}
input,lable,select{
- font-size: 40px;
+ font-size: 25px;
}
</style>
<select id="caseslist" style="width:59%" onchange="listUpdate()">
</select>
<input type="button" style="width:13%" id="nextbutton" value="Next >" onclick="nextTest()"/>
-<input type="button" style="width:13%" id="runbutton" value="Run" onclick="runTest()"/>
+<input type="button" style="width:12%" id="runbutton" value="Run" onclick="runTest()"/>
</div>
<div width=100%>
-<textarea id="casesinfo" rows=11 disabled='disabled' />
+<textarea id="casesinfo" rows=8 disabled='disabled' />
</textarea>
</div>
<div style="width:100%;text-align:right;background-color:#cccccc;">
-<input type="radio" id="passradio" value="Pass" onclick="passRadio()"/><label style="font-size:40px" onclick="passLabel()">Pass</label>
+<input type="radio" id="passradio" value="Pass" onclick="passRadio()"/><label style="font-size:25px" onclick="passLabel()">Pass</label>
-<input type="radio" id="failradio" value="Fail" onclick="failRadio()"/><label style="font-size:40px" onclick="failLabel()">Fail</label>
+<input type="radio" id="failradio" value="Fail" onclick="failRadio()"/><label style="font-size:25px" onclick="failLabel()">Fail</label>
-<input type="radio" id="blockradio" value="Block" onclick="blockRadio()"/><label style="font-size:40px" onclick="blockLabel()">Block</label>
+<input type="radio" id="blockradio" value="Block" onclick="blockRadio()"/><label style="font-size:25px" onclick="blockLabel()">Block</label>
<input type="button" style="width:12%" id="submitbutton" value="Save" onclick="submitTest()"/>
<input type="button" style="width:12%" id="completebutton" value="Done" onclick="completeTest()"/><br>