Fixed TTS-1906 by moving 15 TCs to tct-workers-w3c-tests from delta
authorLiu, Xin <xinx.liu@intel.com>
Thu, 22 Aug 2013 01:53:05 +0000 (09:53 +0800)
committerwanmingx.lin <wanmingx.lin@intel.com>
Thu, 22 Aug 2013 03:12:16 +0000 (11:12 +0800)
Signed-off-by: Liu, Xin <xinx.liu@intel.com>
16 files changed:
tct-workers-w3c-tests/tests.xml
tct-workers-w3c-tests/workers/SharedWorkerException.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/SharedWorkerScriptError.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/SharedWorkerShared_loaded.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/SharedWorkerShared_name_except.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/SharedWorkerShared_simultaneously.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/SharedWorker_in_iframe.html [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/MessagePort_initial_disabled.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/MessagePort_onmessage_start.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_EventTarget.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_XMLHttpRequest.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_addEventListener.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_importScripts_NetworkErr.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_removeEventListener.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/WorkerLocation.htm [new file with mode: 0644]
tct-workers-w3c-tests/workers/w3c/postMessage_DataCloneErr.htm [new file with mode: 0644]

index be9e73607644316e9154ef657439dbd5cff1e2b6..414b3308b9b6fecb3de29ad9164c5b26a4d2f89b 100644 (file)
@@ -3,14 +3,14 @@
 <test_definition>
   <suite name="tct-workers-w3c-tests" launcher="WRTLauncher">
     <set name="WebWorker">
-      <testcase purpose="Check if WorkerLocation URL can decompose IDL attribute: pathname." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="WebWorker_WorkerLocation_pathname_decompose">
+      <testcase purpose="Check if SharedWorkerLocation URL can decompose IDL attribute: pathname." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="WebWorker_WorkerLocation_pathname_decompose">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check if WorkerLocation URL can decompose IDL attribute: pathname</step_desc>
-              <expected>WorkerLocation URL can decompose IDL attribute: pathname.</expected>
+              <step_desc>Check if SharedWorkerLocation URL can decompose IDL attribute: pathname.</step_desc>
+              <expected>SharedWorkerLocation URL can decompose IDL attribute: pathname.</expected>
             </step>
           </steps>
           <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/WebWorker_WorkerLocation_pathname_decompose.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if WorkerNavigator.userAgent can return the complete User-Agent header." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="SharedWorkerNavigator_userAgent">
+      <testcase purpose="Check if SharedWorkerNavigator.userAgent can return the complete User-Agent header." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="SharedWorkerNavigator_userAgent">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check if WorkerNavigator.userAgent can return the complete User-Agent header.</step_desc>
-              <expected>WorkerNavigator.userAgent can return the complete User-Agent header.</expected>
+              <step_desc>Check if SharedWorkerNavigator.userAgent can return the complete User-Agent header.</step_desc>
+              <expected>SharedWorkerNavigator.userAgent can return the complete User-Agent header.</expected>
             </step>
           </steps>
           <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerNavigator_userAgent.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if WorkerNavigator appVersion can return the version of the browser." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="SharedWorkerNavigator_appVersion">
+      <testcase purpose="Check if SharedWorkerNavigator appVersion can return the version of the browser." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P2" id="SharedWorkerNavigator_appVersion">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check if WorkerNavigator appVersion can return the version of the browser.</step_desc>
-              <expected>WorkerNavigator appVersion can return the version of the browser.</expected>
+              <step_desc>Check if SharedWorkerNavigator appVersion can return the version of the browser.</step_desc>
+              <expected>SharedWorkerNavigator appVersion can return the version of the browser.</expected>
             </step>
           </steps>
           <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerNavigator_appVersion.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="check if throw exception when creating SharedWorker with different URLs but same name" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="SharedWorkerShared_name_except">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if shared worker shared Tests</step_desc>
+              <expected>shared worker shared Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerShared_name_except.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="SharedWorkerGlobalScope" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if WorkerGlobalScope XMLHttpRequest support" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerGlobalScope_XMLHttpRequest">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if WorkerGlobalScope XMLHttpRequest support</step_desc>
+              <expected>WorkerGlobalScope XMLHttpRequest support</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_XMLHttpRequest.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="WorkerGlobalScope" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if postMessage() with WorkerNavigator raises DATA_CLONE_ERR" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="postMessage_DataCloneErr">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if postMessage() with WorkerNavigator raises DATA_CLONE_ERR</step_desc>
+              <expected>postMessage() with WorkerNavigator raises DATA_CLONE_ERR</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/postMessage_DataCloneErr.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if Access simultaneously-loaded instance of shared worker." type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="SharedWorkerShared_simultaneously">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if shared worker shared Tests</step_desc>
+              <expected>shared worker shared Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerShared_simultaneously.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="SharedWorker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if MessageChannel port.onmessage enables message queue" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="MessagePort_onmessage_start">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if MessageChannel port.onmessage enables message queue</step_desc>
+              <expected>MessageChannel port.onmessage enables message queue</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/MessagePort_onmessage_start.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if shared worker exception Tests" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="SharedWorkerException">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if shared worker exception Tests</step_desc>
+              <expected>shared worker exception Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerException.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if  shared worker in iframe Tests" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="manual" priority="P3" id="SharedWorker_in_iframe">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if  shared worker in iframe Tests</step_desc>
+              <expected>shared worker in iframe Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorker_in_iframe.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="SharedWorker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if WorkerLocation object" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerLocation">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if WorkerLocation object</step_desc>
+              <expected>WorkerLocation object</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerLocation.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="WorkerLocation" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if shared worker script error Tests" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="SharedWorkerScriptError">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if shared worker script error Tests</step_desc>
+              <expected>shared worker script error Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerScriptError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="SharedWorker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if WorkerGlobalScope implements EventTarget" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerGlobalScope_EventTarget">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if WorkerGlobalScope implements EventTarget</step_desc>
+              <expected>WorkerGlobalScope implements EventTarget</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_EventTarget.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="WorkerGlobalScope" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if importScripts() with non-existent script file raises NETWORK_ERR" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerGlobalScope_importScripts_NetworkErr">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if importScripts() with non-existent script file raises NETWORK_ERR</step_desc>
+              <expected>importScripts() with non-existent script file raises NETWORK_ERR</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_importScripts_NetworkErr.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="WorkerGlobalScope" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if shared worker shared Tests" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="SharedWorkerShared_loaded">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if shared worker shared Tests</step_desc>
+              <expected>shared worker shared Tests</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/SharedWorkerShared_loaded.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="SharedWorker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if MessageChannel: port message queue is initially disabled" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="MessagePort_initial_disabled">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if MessageChannel: port message queue is initially disabled</step_desc>
+              <expected>MessageChannel: port message queue is initially disabled</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/MessagePort_initial_disabled.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if WorkerGlobalScope API: removeEventListener()" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerGlobalScope_removeEventListener">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if WorkerGlobalScope API: removeEventListener()</step_desc>
+              <expected>WorkerGlobalScope API: removeEventListener()</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_removeEventListener.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="check if WorkerGlobalScope API: addEventListener()" type="compliance" status="approved" component="WebAPI/Performance and Optimization/Web Workers (Partial)" execution_type="auto" priority="P3" id="WorkerGlobalScope_addEventListener">
+        <description>
+          <pre_condition>TBD</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>to check if WorkerGlobalScope API: addEventListener()</step_desc>
+              <expected>WorkerGlobalScope API: addEventListener()</expected>
+            </step>
+          </steps>
+          <test_script_entry timeout="90" test_script_expected_result="0">/opt/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_addEventListener.htm</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Worker" specification="Web Workers (Partial)" section="Performance and Optimization" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/workers/</spec_url>
+          </spec>
+        </specs>
+      </testcase>
     </set>
   </suite>
 </test_definition>
diff --git a/tct-workers-w3c-tests/workers/SharedWorkerException.html b/tct-workers-w3c-tests/workers/SharedWorkerException.html
new file mode 100644 (file)
index 0000000..657c7c4
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+-->
+<html>
+
+<head>
+
+<title> shared worker exception Tests </title>
+
+<script src="../resources/testharness.js"></script>
+
+<script src="../resources/testharnessreport.js"></script>
+
+</head>
+
+<body>
+
+<div id=log></div>
+
+<script>
+
+    setup({timeout:500});
+    var DATA = "ping";
+
+    var FileName = './support/shared-worker-exception.js';
+    var t = async_test("Test Description: shared worker exception .");
+
+    var worker = new SharedWorker(FileName,"name");
+
+
+    worker.onerror = t.step_func(function(evt)
+    {
+
+        assert_true(false); //should not be here.
+        t.done();
+
+    });
+    worker.port.onmessage = t.step_func(function(evt)
+    {
+
+        assert_equals(evt.data, DATA);
+        t.done();
+
+    });
+
+    worker.port.postMessage("ping");
+
+
+</script>
+
+</body>
+
+</html>
diff --git a/tct-workers-w3c-tests/workers/SharedWorkerScriptError.html b/tct-workers-w3c-tests/workers/SharedWorkerScriptError.html
new file mode 100644 (file)
index 0000000..eab31ec
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+-->
+<html>
+
+<head>
+
+<title> shared worker script error Tests </title>
+
+<script src="../resources/testharness.js"></script>
+
+<script src="../resources/testharnessreport.js"></script>
+
+</head>
+
+<body>
+
+<div id=log></div>
+
+<script>
+
+    setup({timeout:500});
+    var DATA1="unhandledError";
+    var DATA2="handledError";
+
+    var FileName = './support/shared-worker-script-error.js';
+    var t1 = async_test("Test Description: shared worker script error:unhandledError .");
+
+    var worker = new SharedWorker(FileName);
+
+
+    worker.port.onmessage = t1.step_func(function(evt)
+
+   {
+
+     assert_equals(evt.data, DATA1);
+
+     t1.done();
+
+   });
+    worker.port.postMessage("unhandled");
+
+    var t2 = async_test("Test Description: shared worker script error:handledError .");
+
+    var worker2 = new SharedWorker(FileName);
+
+
+    worker2.port.onmessage = t2.step_func(function(evt)
+
+   {
+
+     assert_equals(evt.data, DATA2);
+
+     t2.done();
+
+   });
+
+  worker2.port.postMessage("handled");
+
+</script>
+
+</body>
+
+</html>
diff --git a/tct-workers-w3c-tests/workers/SharedWorkerShared_loaded.html b/tct-workers-w3c-tests/workers/SharedWorkerShared_loaded.html
new file mode 100644 (file)
index 0000000..d8fb21b
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+-->
+<html>
+
+<head>
+
+<title> shared worker shared Tests </title>
+
+<script src="../resources/testharness.js"></script>
+
+<script src="../resources/testharnessreport.js"></script>
+
+</head>
+
+<body>
+
+<div id=log></div>
+
+<script>
+    setup({timeout:500});
+    var DATA1="self.foo: 1234";
+    var DATA2="self.foo: undefined";
+
+
+    var FileName = './support/shared-worker-shared.js';
+    var t1 = async_test("Test Description: shared worker shared: different name worker use distict instance.");
+    //var t1 = async_test("Test Description: shared worker shared: name exception.");
+
+    // Load two workers simultaneously, to ensure that simultaneous loads also yield the same instance.
+    // Loading a worker named "name" tests that workers shutdown when the parent document exits, because other tests also create workers with that same name but with different URLs.
+    var worker = new SharedWorker(FileName, 'name');
+
+    // Set something in global context in one worker, read value back on other worker, to make sure they are truly shared.
+    worker.port.postMessage("eval self.foo = 1234");
+    worker.port.onmessage = t1.step_func(function(event)
+    {
+
+        // New name, so should be a distinct worker from the previous one.
+            var worker3 = new SharedWorker(FileName, 'name2');
+            worker3.port.postMessage("eval self.foo");
+            worker3.port.onmessage = function(event)
+            {
+                assert_equals(event.data, "self.foo: undefined");
+                t1.done();
+            }
+
+    });
+
+</script>
+
+</body>
+
+</html>
diff --git a/tct-workers-w3c-tests/workers/SharedWorkerShared_name_except.html b/tct-workers-w3c-tests/workers/SharedWorkerShared_name_except.html
new file mode 100644 (file)
index 0000000..1d5d100
--- /dev/null
@@ -0,0 +1,82 @@
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+Revision history:
+Date                        Author                                 Description
+03-13-2012         Cui, ZhongyouX <zhongyoux.cui@intel.com>       case creation
+
+-->
+
+<!DOCTYPE html>
+
+<html>
+
+<head>
+
+<title> shared worker shared Tests </title>
+
+<script src="../resources/testharness.js"></script>
+
+<script src="../resources/testharnessreport.js"></script>
+
+</head>
+
+<body>
+
+<div id=log></div>
+
+<script>
+    setup({timeout:500});
+
+    var FileName = './support/shared-worker-shared.js';
+
+    // Loading a worker named "name" tests that workers shutdown when the parent document exits, because other tests also create workers with that same name but with different URLs.
+    var worker = new SharedWorker(FileName, 'name');
+    var result = 'FAIL';
+
+    try {
+        new SharedWorker('some-other-url.js', 'name');
+        console.log("FAIL: Creating SharedWorker with different URLs but the same name should fail");
+        result = 'FAIL: Creating SharedWorker with different URLs but the same name should fail';
+    } catch (ex) {
+        console.log("PASS: Exception thrown when creating SharedWorker with different URLs but same name: " + ex);
+        result = 'PASS';
+    }
+
+    test(function()
+    {
+        assert_equals(result, 'PASS');
+
+    }, "Test Description: shared worker shared: name exception.Exception thrown when creating SharedWorker with different URLs but same name.");
+
+</script>
+
+</body>
+
+</html>
diff --git a/tct-workers-w3c-tests/workers/SharedWorkerShared_simultaneously.html b/tct-workers-w3c-tests/workers/SharedWorkerShared_simultaneously.html
new file mode 100644 (file)
index 0000000..270da54
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+-->
+<html>
+
+<head>
+
+<title> shared worker shared Tests </title>
+
+<script src="../resources/testharness.js"></script>
+
+<script src="../resources/testharnessreport.js"></script>
+
+</head>
+
+<body>
+
+<div id=log></div>
+
+<script>
+    setup({timeout:500});
+    var DATA1="self.foo: 1234";
+    var DATA2="self.foo: undefined";
+
+
+    var FileName = './support/shared-worker-shared.js';
+    var t1 = async_test("Test Description: shared worker shared: Accessing simultaneously-loaded instance of shared worker.");
+
+
+    // Load two workers simultaneously, to ensure that simultaneous loads also yield the same instance.
+    // Loading a worker named "name" tests that workers shutdown when the parent document exits, because other tests also create workers with that same name but with different URLs.
+    var worker = new SharedWorker(FileName, 'name');
+    var worker2 = new SharedWorker(FileName, 'name');
+
+    try {
+        new SharedWorker('some-other-url.js', 'name');
+        console.log("FAIL: Creating SharedWorker with different URLs but the same name should fail");
+    } catch (ex) {
+        console.log("PASS: Exception thrown when creating SharedWorker with different URLs but same name: " + ex);
+    }
+    // Set something in global context in one worker, read value back on other worker, to make sure they are truly shared.
+    worker.port.postMessage("eval self.foo");
+    worker.port.onmessage = t1.step_func(function(event)
+    {
+        worker.port.postMessage("eval self.foo = 1234");
+        worker.port.onmessage = function(event)
+        {
+            worker2.port.postMessage("eval self.foo");
+            worker2.port.onmessage = function(event)
+        {
+            assert_equals(event.data, DATA1);
+            t1.done();
+        }
+      }
+    });
+
+</script>
+
+</body>
+
+</html>
diff --git a/tct-workers-w3c-tests/workers/SharedWorker_in_iframe.html b/tct-workers-w3c-tests/workers/SharedWorker_in_iframe.html
new file mode 100644 (file)
index 0000000..f8e6b82
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Cui, ZhongyouX <zhongyoux.cui@intel.com>
+
+-->
+<html>
+<head>
+<title> shared worker in iframe Tests </title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log>Log:</div>
+<script>
+
+     var t = async_test("Test Description: shared worker in iframe .");
+     var DATA =2;
+     setTimeout(function(){
+          var worker = new SharedWorker('support/shared-worker-in-iframe.js');
+          worker.port.onmessage = t.step_func(function(evt)
+     { assert_equals(evt.data, DATA); t.done(); }
+
+     )},500);
+
+</script>
+<iframe src='support/shared-worker-iframe.html'></iframe>
+</body>
+</html>
diff --git a/tct-workers-w3c-tests/workers/w3c/MessagePort_initial_disabled.htm b/tct-workers-w3c-tests/workers/w3c/MessagePort_initial_disabled.htm
new file mode 100644 (file)
index 0000000..00c60fe
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> MessageChannel: port message queue is initially disabled </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var TestResult = true;
+    
+    var t = async_test("Test Description: A port message queue can be enabled or disabled, and is initially disabled.");
+                  
+    var channel = new MessageChannel();
+    
+    channel.port2.addEventListener("message", TestMessageEvent, true);
+    
+    channel.port1.postMessage("ping");
+    
+    setTimeout(t.step_func(VerifyResult), 100);
+    
+    function TestMessageEvent(evt)
+    {
+        TestResult = false;
+    }
+
+    function VerifyResult()
+    {
+        assert_true(TestResult, "Port message queue is initially disabled?");
+        t.done();
+    }
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/MessagePort_onmessage_start.htm b/tct-workers-w3c-tests/workers/w3c/MessagePort_onmessage_start.htm
new file mode 100644 (file)
index 0000000..23130fa
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> MessageChannel: port.onmessage enables message queue </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var TestResult = false;
+    var description = "The first time a MessagePort object's onmessage IDL attribute is set, the port's "
+                    + "port message queue must be enabled, as if the start() method had been called.";
+    
+    var t = async_test("Test Description: " + description);
+                  
+    var channel = new MessageChannel();
+    
+    channel.port2.onmessage = TestMessageEvent;
+    
+    channel.port1.postMessage("ping");
+    
+    setTimeout(t.step_func(VerifyResult), 100);
+    
+    function TestMessageEvent(evt)
+    {
+        TestResult = true;
+    }
+
+    function VerifyResult()
+    {
+        assert_true(TestResult, "Port message queue is enabled?");
+        t.done();
+    }
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_EventTarget.htm b/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_EventTarget.htm
new file mode 100644 (file)
index 0000000..9a56656
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> WorkerGlobalScope implements EventTarget </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var DATA = "TestEventTarget";
+    var FileName = './support/EventListener.js';
+    
+    var t = async_test("Test Description: WorkerGlobalScope implements EventTarget");
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        var global = evt.data[0];
+        var target = evt.data[1];
+        
+        assert_regexp_match(target, /\[object (.*?)Worker(.+?)\]/);
+        assert_equals(target, global);
+
+        t.done();        
+    });
+    
+    worker.postMessage(DATA);
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_XMLHttpRequest.htm b/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_XMLHttpRequest.htm
new file mode 100644 (file)
index 0000000..ea8c19d
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> WorkerGlobalScope XMLHttpRequest() support </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var FileName = './support/XMLHttpRequest.js';
+    var RequstUrl = 'XMLHttpRequest.txt';
+    var ExpectedResult = "Request Succeeded!";
+
+    var t = async_test("Test Description: WorkerGlobalScope XMLHttpRequest() support.");
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        assert_equals(evt.data, ExpectedResult);
+        t.done();
+    });
+
+    worker.postMessage(RequstUrl);
+</script>
+</body>
+</html>
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_addEventListener.htm b/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_addEventListener.htm
new file mode 100644 (file)
index 0000000..ac34619
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> WorkerGlobalScope API: addEventListener() </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var DATA = "ping";
+    var FileName = './support/EventListener.js';
+    
+    var t = async_test("Test Description: WorkerGlobalScope API: addEventListener().");
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        assert_equals(evt.data, DATA);
+        t.done();
+    });
+    
+    worker.postMessage(DATA);
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_importScripts_NetworkErr.htm b/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_importScripts_NetworkErr.htm
new file mode 100644 (file)
index 0000000..6d60369
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> importScripts() with non-existent script file raises NETWORK_ERR </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var FileName = "./support/ImportScriptsNetworkErr.js";
+    var ExpectedResult = "Pass";
+    var description = "importScripts(): Throw NETWORK_ERR exception whenever attempt to fetch script is failed.";
+    
+    var t = async_test("Test Description: " + description);
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        assert_equals(evt.data, ExpectedResult);
+        t.done();
+    });
+</script>
+</body>
+</html>
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_removeEventListener.htm b/tct-workers-w3c-tests/workers/w3c/WorkerGlobalScope_removeEventListener.htm
new file mode 100644 (file)
index 0000000..5010b41
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> WorkerGlobalScope API: removeEventListener() </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var DATA = "TestEventTarget";
+    var FileName = './support/EventListener.js';
+    var ExpectedResult = "ping"; 
+    var StartTime = (new Date()).valueOf();
+    var description = "WorkerGlobalScope API: removeEventListener()";
+
+    var t = async_test("Test Description: " + description);
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = function(evt)
+    {
+        TestResult = evt.data;
+        var time = (new Date()).valueOf() - StartTime;
+        
+        if (TestResult == ExpectedResult)
+        {
+            worker.postMessage("pong");
+            setTimeout(t.step_func(VerifyResult), time * 2);
+        }
+    };
+    
+    worker.postMessage("removeEventListener");
+
+    function VerifyResult()
+    {
+        assert_equals(TestResult, ExpectedResult);
+        t.done();
+    }
+</script>
+</body>
+</html>
+
+<!DOCTYPE html>
+<html>
+<head>
+<title> Close: clear events queue </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/WorkerLocation.htm b/tct-workers-w3c-tests/workers/w3c/WorkerLocation.htm
new file mode 100644 (file)
index 0000000..c22084e
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> WorkerLocation object </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var FileName = './support/WorkerLocation.js';
+    var href = window.location.href;
+    var ExpectedResult = href.substring(0, href.lastIndexOf('/')) + FileName.substring(1);
+    
+    var t = async_test("Test Description: A WorkerLocation object represents an absolute URL set at its creation.");
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        assert_equals(evt.data.location, ExpectedResult);
+        t.done();
+    });
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tct-workers-w3c-tests/workers/w3c/postMessage_DataCloneErr.htm b/tct-workers-w3c-tests/workers/w3c/postMessage_DataCloneErr.htm
new file mode 100644 (file)
index 0000000..3998bc0
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title> postMessage() with WorkerNavigator raises DATA_CLONE_ERR </title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+<script>
+    setup({timeout:500});
+    var FileName = "./support/WorkerDataCloneErr.js";
+    var ExpectedResult = "Pass";
+    var description = "Throw a DATA_CLONE_ERR exception when a host object (e.g. a DOM node) is used with postMessage.";
+    
+    var t = async_test("Test Description: " + description);
+                  
+    var worker = new Worker(FileName);
+
+    worker.onmessage = t.step_func(function(evt)
+    {
+        assert_equals(evt.data, ExpectedResult);
+        t.done();
+    });
+</script>
+</body>
+</html>
\ No newline at end of file