<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[150973] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/150973">150973</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2013-05-30 11:34:56 -0700 (Thu, 30 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update XMLHttpRequest timeout tests to a newer version from W3C
https://bugs.webkit.org/show_bug.cgi?id=117023

Reviewed by Alexey Proskuryakov.

The XMLHttpRequest Timeout tests have gone through a bit of restructuring and should
be updated. This is being primarily done because of the intention of updating the
testharness scripts which would break these tests if they were left not updated.

These tests were updated from the W3C web-platform-tests GitHub repository.
https://github.com/w3c/web-platform-tests

* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html: Added.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js:
(RequestTracker.prototype.startXHR):
(AbortedRequest.prototype.startXHR.handleEvent):
(runTestRequests):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedhtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedonmainhtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpireshtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutrunnerjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsimplehtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconmainhtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeouttwicehtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkerabortedhtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverridesexpireshtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkersimplehtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkersynconworkerhtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkertwicehtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedonmainjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpectedtxt">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverrideshtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpiresjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsimplejs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconmainjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconworkerjs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeouttwicejs">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverridesexpectedtxt">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverrideshtml">trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/ChangeLog        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2013-05-30  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        Update XMLHttpRequest timeout tests to a newer version from W3C
+        https://bugs.webkit.org/show_bug.cgi?id=117023
+
+        Reviewed by Alexey Proskuryakov.
+
+        The XMLHttpRequest Timeout tests have gone through a bit of restructuring and should
+        be updated. This is being primarily done because of the intention of updating the
+        testharness scripts which would break these tests if they were left not updated.
+
+        These tests were updated from the W3C web-platform-tests GitHub repository.
+        https://github.com/w3c/web-platform-tests
+
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html: Added.
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html:
+        * http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js:
+        (RequestTracker.prototype.startXHR):
+        (AbortedRequest.prototype.startXHR.handleEvent):
+        (runTestRequests):
+
</ins><span class="cx"> 2013-05-30  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Allow no space between &quot;background-position:&quot; dimensions
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,11 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-aborted.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new AbortedRequest(false),
+                  new AbortedRequest(true, -1),
+                  new AbortedRequest(true, TIME_NORMAL_LOAD) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedonmainhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,12 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-abortedonmain.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutabortedonmainjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+runTestRequests([ new AbortedRequest(true, 0),
+                  new AbortedRequest(true, TIME_DELAY) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Description
+
+This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.
+
+
+PASS XHR2 Timeout Property Tests 
+PASS XHR2 Timeout Property Tests 1 
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverrideshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+ &lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot; /&gt;
+    &lt;title&gt;XHR2 Timeout Property Tests&lt;/title&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/XMLHttpRequest/#timeout-error&quot; /&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;/w3c/resources/testharness.css&quot; /&gt;
+    &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;h1&gt;Description&lt;/h1&gt;
+    &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
+    &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+    &lt;script src=&quot;xmlhttprequest-timeout-overrides.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new RequestTracker(true, &quot;timeout disabled after initially set&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, 0),
+                  // new RequestTracker(true, &quot;timeout overrides load after a delay&quot;, TIME_NORMAL_LOAD, TIME_DELAY, TIME_REGULAR_TIMEOUT),
+                  new RequestTracker(true, &quot;timeout enabled after initially disabled&quot;, 0, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpireshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,11 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-overridesexpires.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutoverridesexpiresjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new RequestTracker(true, &quot;timeout set to expiring value after load fires&quot;, TIME_NORMAL_LOAD, TIME_LATE_TIMEOUT, TIME_DELAY),
+          // FIXME: http://webkit.org/b/98156 - Late updates are not supported yet, this test is not run.
+                  // new RequestTracker(true, &quot;timeout set to expired value before load fires&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_DELAY),
+                  new RequestTracker(true, &quot;timeout set to non-expiring value after timeout fires&quot;, TIME_DELAY, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutrunnerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -13,12 +13,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function groupFromLocation() {
-    suffixMatch = /xmlhttprequest-timeout-(.*)\.html/;
-    group = suffixMatch.exec(document.location.href)[1];
-    group = group.replace(&quot;worker-&quot;, &quot;&quot;);
-    return group;
-}
</del><ins>+window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
</ins><span class="cx"> 
</span><span class="cx"> // Setting up testharness.js
</span><span class="cx"> setup({ explicit_done: true, timeout: 30 * 1000 });
</span><span class="lines">@@ -28,4 +23,3 @@
</span><span class="cx">     if (t.status == t.FAIL)
</span><span class="cx">         done();
</span><span class="cx"> });
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,12 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-simple.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsimplejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new RequestTracker(true, &quot;no time out scheduled, load fires normally&quot;, 0),
+                  new RequestTracker(true, &quot;load fires normally&quot;, TIME_NORMAL_LOAD),
+                  new RequestTracker(true, &quot;timeout hit before load&quot;, TIME_REGULAR_TIMEOUT) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconmainhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,12 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-synconmain.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconmainjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+runTestRequests([ SyncRequestSettingTimeoutAfterOpen,
+                  SyncRequestSettingTimeoutBeforeOpen ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutsynconworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new RequestTracker(false, &quot;no time out scheduled, load fires normally&quot;, 0),
+                  new RequestTracker(false, &quot;load fires normally&quot;, TIME_NORMAL_LOAD),
+                  new RequestTracker(false, &quot;timeout hit before load&quot;, TIME_REGULAR_TIMEOUT) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeouttwicehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -9,18 +9,12 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script&gt;
-        function testXhr() {
-            window.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            window.postMessage(runTests, &quot;*&quot;);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;xmlhttprequest-timeout-twice.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeouttwicejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+if (this.document === undefined)
+  importScripts(&quot;xmlhttprequest-timeout.js&quot;);
+
+runTestRequests([ new RequestTracker(true, &quot;load fires normally with no timeout set, twice&quot;, 0, TIME_REGULAR_TIMEOUT, 0),
+                  new RequestTracker(true, &quot;load fires normally with same timeout set twice&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD),
+                  new RequestTracker(true, &quot;timeout fires normally with same timeout set twice&quot;, TIME_REGULAR_TIMEOUT, TIME_DELAY, TIME_REGULAR_TIMEOUT) ]);
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkerabortedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -8,20 +8,14 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot;&gt;
-        function testXhr() {
-            var worker = new Worker(&quot;xmlhttprequest-timeout.js&quot;);
-            worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            worker.postMessage(runTests);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-aborted.js&quot;);
+        worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
+    &lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverridesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Description
+
+This test validates that the XHR2 timeout property behaves as expected in in a worker context.
+
+
+PASS XHR2 Timeout Property Tests in Worker 
+PASS XHR2 Timeout Property Tests in Worker 1 
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverrideshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html (0 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+ &lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot; /&gt;
+    &lt;title&gt;XHR2 Timeout Property Tests in Worker&lt;/title&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/XMLHttpRequest/#timeout-error&quot; /&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;/w3c/resources/testharness.css&quot; /&gt;
+    &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;h1&gt;Description&lt;/h1&gt;
+    &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
+    &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-overrides.js&quot;);
+        worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
+    &lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkeroverridesexpireshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -8,20 +8,14 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot;&gt;
-        function testXhr() {
-            var worker = new Worker(&quot;xmlhttprequest-timeout.js&quot;);
-            worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            worker.postMessage(runTests);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-overridesexpires.js&quot;);
+        worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
+    &lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkersimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -8,20 +8,15 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot;&gt;
-        function testXhr() {
-            var worker = new Worker(&quot;xmlhttprequest-timeout.js&quot;);
-            worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            worker.postMessage(runTests);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-simple.js&quot;);
+        worker.onmessage = testResultCallbackHandler;
+    &lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkersynconworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -8,20 +8,14 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot;&gt;
-        function testXhr() {
-            var worker = new Worker(&quot;xmlhttprequest-timeout.js&quot;);
-            worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            worker.postMessage(runTests);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-synconworker.js&quot;);
+        worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
+    &lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutworkertwicehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -8,20 +8,15 @@
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/w3c/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;xmlhttprequest-timeout-runner.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot;&gt;
-        function testXhr() {
-            var worker = new Worker(&quot;xmlhttprequest-timeout.js&quot;);
-            worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
-
-            var runTests = { &quot;type&quot;: &quot;start&quot;, &quot;group&quot;: groupFromLocation() };
-            worker.postMessage(runTests);
-        };
-    &lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;testXhr()&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx">     &lt;h1&gt;Description&lt;/h1&gt;
</span><span class="cx">     &lt;p&gt;This test validates that the XHR2 timeout property behaves as expected in in a worker context.&lt;/p&gt;
</span><span class="cx">     &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script type=&quot;text/javascript&quot;&gt;
+        var worker = new Worker(&quot;xmlhttprequest-timeout-twice.js&quot;);
+        worker.addEventListener(&quot;message&quot;, testResultCallbackHandler);
+    &lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequesttimeoutxmlhttprequesttimeoutjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js (150972 => 150973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js        2013-05-30 18:20:32 UTC (rev 150972)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js        2013-05-30 18:34:56 UTC (rev 150973)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>-/* Test imported from Alex Vincent's XHR2 timeout tests, written for Mozilla.
</del><ins>+/* Test adapted from Alex Vincent's XHR2 timeout tests, written for Mozilla.
</ins><span class="cx">    https://hg.mozilla.org/mozilla-central/file/tip/content/base/test/
</span><del>-   Released into the public domain, according to
</del><ins>+   Released into the public domain or under BSD, according to
</ins><span class="cx">    https://bugzilla.mozilla.org/show_bug.cgi?id=525816#c86
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> var TIME_DELAY = 200;
</span><span class="cx"> 
</span><span class="cx"> /*
</span><del>- * This should point to a resource that responds after a delay of TIME_XHR_LOAD milliseconds.
</del><ins>+ * This should point to a resource that responds with a text/plain resource after a delay of TIME_XHR_LOAD milliseconds.
</ins><span class="cx">  */
</span><span class="cx"> var STALLED_REQUEST_URL = &quot;/resources/load-and-stall.cgi?name=../../../http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js&amp;stallFor=&quot; + TIME_XHR_LOAD/1000 + &quot;&amp;stallAt=0&amp;mimeType=text/plain&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">     req.ontimeout = handleEvent;
</span><span class="cx"> 
</span><span class="cx">     req.timeout = this.timeLimit;
</span><del>-    
</del><ins>+
</ins><span class="cx">     if (this.mustReset) {
</span><span class="cx">       var resetTo = this.resetTo;
</span><span class="cx">       self.setTimeout(function() {
</span><span class="lines">@@ -185,15 +185,14 @@
</span><span class="cx">     var req = new XMLHttpRequest();
</span><span class="cx">     this.request = req;
</span><span class="cx">     req.open(&quot;GET&quot;, STALLED_REQUEST_URL);
</span><del>-    var me = this;
-    function handleEvent(e) { return me.handleEvent(e); };
</del><ins>+    var _this = this;
+    function handleEvent(e) { return _this.handleEvent(e); };
</ins><span class="cx">     req.onerror = handleEvent;
</span><span class="cx">     req.onload = handleEvent;
</span><span class="cx">     req.onabort = handleEvent;
</span><span class="cx">     req.ontimeout = handleEvent;
</span><span class="cx"> 
</span><span class="cx">     req.timeout = TIME_REGULAR_TIMEOUT;
</span><del>-    var _this = this;
</del><span class="cx"> 
</span><span class="cx">     function abortReq() {
</span><span class="cx">       req.abort();
</span><span class="lines">@@ -294,56 +293,6 @@
</span><span class="cx">   }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-var TestRequestGroups = {
-  &quot;simple&quot; : [
-    new RequestTracker(true, &quot;no time out scheduled, load fires normally&quot;, 0),
-    new RequestTracker(true, &quot;load fires normally&quot;, TIME_NORMAL_LOAD),
-    new RequestTracker(true, &quot;timeout hit before load&quot;, TIME_REGULAR_TIMEOUT)
-  ],
-
-  &quot;twice&quot; : [
-     new RequestTracker(true, &quot;load fires normally with no timeout set, twice&quot;, 0, TIME_REGULAR_TIMEOUT, 0),
-     new RequestTracker(true, &quot;load fires normally with same timeout set twice&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD),
-     new RequestTracker(true, &quot;timeout fires normally with same timeout set twice&quot;, TIME_REGULAR_TIMEOUT, TIME_DELAY, TIME_REGULAR_TIMEOUT)
-  ],
-
-  // FIXME: http://webkit.org/b/98156 - Late updates are not supported yet, these tests are not run.
-  &quot;overrides&quot; : [
-    new RequestTracker(true, &quot;timeout disabled after initially set&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, 0),
-    new RequestTracker(true, &quot;timeout overrides load after a delay&quot;, TIME_NORMAL_LOAD, TIME_DELAY, TIME_REGULAR_TIMEOUT),
-    new RequestTracker(true, &quot;timeout enabled after initially disabled&quot;, 0, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD)
-  ],
-
-  &quot;overridesexpires&quot; : [
-    new RequestTracker(true, &quot;timeout set to expiring value after load fires&quot;, TIME_NORMAL_LOAD, TIME_LATE_TIMEOUT, TIME_DELAY),
-    // FIXME: http://webkit.org/b/98156 - Late updates are not supported yet, this test is not run.
-    // new RequestTracker(true, &quot;timeout set to expired value before load fires&quot;, TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_DELAY),
-    new RequestTracker(true, &quot;timeout set to non-expiring value after timeout fires&quot;, TIME_DELAY, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD)
-  ],
-
-  &quot;aborted&quot; : [
-    new AbortedRequest(false),
-    new AbortedRequest(true, -1),
-    new AbortedRequest(true, TIME_NORMAL_LOAD)
-  ],
-
-  &quot;abortedonmain&quot; : [
-    new AbortedRequest(true, 0),
-    new AbortedRequest(true, TIME_DELAY)
-  ],
-
-  &quot;synconmain&quot; : [
-    SyncRequestSettingTimeoutAfterOpen,
-    SyncRequestSettingTimeoutBeforeOpen
-  ],
-
-  &quot;synconworker&quot; : [
-    new RequestTracker(false, &quot;no time out scheduled, load fires normally&quot;, 0),
-    new RequestTracker(false, &quot;load fires normally&quot;, TIME_NORMAL_LOAD),
-    new RequestTracker(false, &quot;timeout hit before load&quot;, TIME_REGULAR_TIMEOUT)
-  ]
-};
-
</del><span class="cx"> var TestRequests = [];
</span><span class="cx"> 
</span><span class="cx"> // This code controls moving from one test to another.
</span><span class="lines">@@ -367,9 +316,7 @@
</span><span class="cx">   }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-self.addEventListener(&quot;message&quot;, function (event) {
-  if (event.data.type == &quot;start&quot;) {
-    TestRequests = TestRequestGroups[event.data.group];
</del><ins>+function runTestRequests(testRequests) {
+    TestRequests = testRequests;
</ins><span class="cx">     TestCounter.next();
</span><del>-  }
-});
</del><ins>+}
</ins></span></pre>
</div>
</div>

</body>
</html>