Title: [237618] trunk/LayoutTests/imported/w3c
Revision
237618
Author
[email protected]
Date
2018-10-30 19:30:33 -0700 (Tue, 30 Oct 2018)

Log Message

Resync XHR Web Platform Tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=191085

Reviewed by Alex Christensen.

Resync XHR Web Platform Tests from upstream 75b0f336c5.

* web-platform-tests/xhr/abort-after-stop.htm:
* web-platform-tests/xhr/getallresponseheaders-expected.txt:
* web-platform-tests/xhr/getallresponseheaders.htm:
* web-platform-tests/xhr/getresponseheader.any-expected.txt: Added.
* web-platform-tests/xhr/getresponseheader.any.html: Added.
* web-platform-tests/xhr/getresponseheader.any.js: Added.
(async_test.t.client.onload.t.step_func_done):
* web-platform-tests/xhr/getresponseheader.any.worker-expected.txt: Added.
* web-platform-tests/xhr/getresponseheader.any.worker.html: Added.
* web-platform-tests/xhr/headers-normalize-response-expected.txt:
* web-platform-tests/xhr/headers-normalize-response.htm:
* web-platform-tests/xhr/open-after-abort.htm:
* web-platform-tests/xhr/open-after-stop.window-expected.txt: Added.
* web-platform-tests/xhr/open-after-stop.window.html: Added.
* web-platform-tests/xhr/open-after-stop.window.js: Added.
(onload):
* web-platform-tests/xhr/overridemimetype-edge-cases.window-expected.txt:
* web-platform-tests/xhr/overridemimetype-edge-cases.window.js:
(async_test.t.client.onload.t.step_func_done):
(async_test.t.client.onload.t.step_func):
* web-platform-tests/xhr/resources/headers-www-authenticate.asis: Added.
* web-platform-tests/xhr/resources/inspect-headers.py:
(get_response):
* web-platform-tests/xhr/resources/responseXML-unavailable-in-worker.js:
(test):
* web-platform-tests/xhr/resources/w3c-import.log:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-aborted.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-abortedonmain.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-overrides.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-overridesexpires.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-simple.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconmain.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconworker.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout-twice.js:
* web-platform-tests/xhr/resources/xmlhttprequest-timeout.js:
(AbortedRequest):
(SyncRequestSettingTimeoutAfterOpen.this.startXHR):
(SyncRequestSettingTimeoutAfterOpen):
(SyncRequestSettingTimeoutBeforeOpen.this.startXHR):
(SyncRequestSettingTimeoutBeforeOpen):
(runTestRequests):
* web-platform-tests/xhr/send-content-type-charset-expected.txt:
* web-platform-tests/xhr/send-content-type-charset.htm:
* web-platform-tests/xhr/send-data-readablestream.any-expected.txt: Added.
* web-platform-tests/xhr/send-data-readablestream.any.html: Added.
* web-platform-tests/xhr/send-data-readablestream.any.js: Added.
(assert_xhr):
(test):
(promise_test.async):
* web-platform-tests/xhr/send-data-readablestream.any.worker-expected.txt: Added.
* web-platform-tests/xhr/send-data-readablestream.any.worker.html: Added.
* web-platform-tests/xhr/setrequestheader-allow-empty-value-expected.txt:
* web-platform-tests/xhr/setrequestheader-allow-whitespace-in-value-expected.txt:
* web-platform-tests/xhr/setrequestheader-header-allowed-expected.txt:
* web-platform-tests/xhr/setrequestheader-header-allowed.htm:
* web-platform-tests/xhr/timeout-multiple-fetches.html:
* web-platform-tests/xhr/w3c-import.log:
* web-platform-tests/xhr/xmlhttprequest-timeout-aborted.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-abortedonmain.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-overrides.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-overridesexpires.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-simple.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-synconmain-expected.txt:
* web-platform-tests/xhr/xmlhttprequest-timeout-synconmain.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-twice.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-aborted.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-overrides.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-overridesexpires.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-simple.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-synconworker.html:
* web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,3 +1,84 @@
+2018-10-30  Chris Dumez  <[email protected]>
+
+        Resync XHR Web Platform Tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=191085
+
+        Reviewed by Alex Christensen.
+
+        Resync XHR Web Platform Tests from upstream 75b0f336c5.
+
+        * web-platform-tests/xhr/abort-after-stop.htm:
+        * web-platform-tests/xhr/getallresponseheaders-expected.txt:
+        * web-platform-tests/xhr/getallresponseheaders.htm:
+        * web-platform-tests/xhr/getresponseheader.any-expected.txt: Added.
+        * web-platform-tests/xhr/getresponseheader.any.html: Added.
+        * web-platform-tests/xhr/getresponseheader.any.js: Added.
+        (async_test.t.client.onload.t.step_func_done):
+        * web-platform-tests/xhr/getresponseheader.any.worker-expected.txt: Added.
+        * web-platform-tests/xhr/getresponseheader.any.worker.html: Added.
+        * web-platform-tests/xhr/headers-normalize-response-expected.txt:
+        * web-platform-tests/xhr/headers-normalize-response.htm:
+        * web-platform-tests/xhr/open-after-abort.htm:
+        * web-platform-tests/xhr/open-after-stop.window-expected.txt: Added.
+        * web-platform-tests/xhr/open-after-stop.window.html: Added.
+        * web-platform-tests/xhr/open-after-stop.window.js: Added.
+        (onload):
+        * web-platform-tests/xhr/overridemimetype-edge-cases.window-expected.txt:
+        * web-platform-tests/xhr/overridemimetype-edge-cases.window.js:
+        (async_test.t.client.onload.t.step_func_done):
+        (async_test.t.client.onload.t.step_func):
+        * web-platform-tests/xhr/resources/headers-www-authenticate.asis: Added.
+        * web-platform-tests/xhr/resources/inspect-headers.py:
+        (get_response):
+        * web-platform-tests/xhr/resources/responseXML-unavailable-in-worker.js:
+        (test):
+        * web-platform-tests/xhr/resources/w3c-import.log:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-aborted.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-abortedonmain.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-overrides.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-overridesexpires.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-simple.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconmain.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconworker.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout-twice.js:
+        * web-platform-tests/xhr/resources/xmlhttprequest-timeout.js:
+        (AbortedRequest):
+        (SyncRequestSettingTimeoutAfterOpen.this.startXHR):
+        (SyncRequestSettingTimeoutAfterOpen):
+        (SyncRequestSettingTimeoutBeforeOpen.this.startXHR):
+        (SyncRequestSettingTimeoutBeforeOpen):
+        (runTestRequests):
+        * web-platform-tests/xhr/send-content-type-charset-expected.txt:
+        * web-platform-tests/xhr/send-content-type-charset.htm:
+        * web-platform-tests/xhr/send-data-readablestream.any-expected.txt: Added.
+        * web-platform-tests/xhr/send-data-readablestream.any.html: Added.
+        * web-platform-tests/xhr/send-data-readablestream.any.js: Added.
+        (assert_xhr):
+        (test):
+        (promise_test.async):
+        * web-platform-tests/xhr/send-data-readablestream.any.worker-expected.txt: Added.
+        * web-platform-tests/xhr/send-data-readablestream.any.worker.html: Added.
+        * web-platform-tests/xhr/setrequestheader-allow-empty-value-expected.txt:
+        * web-platform-tests/xhr/setrequestheader-allow-whitespace-in-value-expected.txt:
+        * web-platform-tests/xhr/setrequestheader-header-allowed-expected.txt:
+        * web-platform-tests/xhr/setrequestheader-header-allowed.htm:
+        * web-platform-tests/xhr/timeout-multiple-fetches.html:
+        * web-platform-tests/xhr/w3c-import.log:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-aborted.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-abortedonmain.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-overrides.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-overridesexpires.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-simple.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-synconmain-expected.txt:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-synconmain.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-twice.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-aborted.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-overrides.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-overridesexpires.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-simple.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-synconworker.html:
+        * web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html:
+
 2018-10-30  Sihui Liu  <[email protected]>
 
         IndexedDB: iteration of cursors skip records if updated or deleted

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/abort-after-stop.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/abort-after-stop.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/abort-after-stop.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -13,7 +13,9 @@
       window._onload_ = test.step_func(function() {
         var client = new XMLHttpRequest();
         var abortFired = false;
+        var sync = true;
         client._onabort_ = test.step_func(function (e) {
+          assert_false(sync);
           assert_equals(e.type, 'abort');
           abortFired = true;
         });
@@ -24,6 +26,7 @@
           test.done();
         }, 200);
         window.stop();
+        sync = false;
       });
     </script>
   </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -2,4 +2,5 @@
 PASS XMLHttpRequest: getAllResponseHeaders() 
 PASS XMLHttpRequest: getAllResponseHeaders() 1 
 PASS XMLHttpRequest: getAllResponseHeaders() 2 
+PASS XMLHttpRequest: getAllResponseHeaders() 3 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getallresponseheaders.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -30,4 +30,14 @@
   client.send()
   assert_equals(client.getAllResponseHeaders(), "content-length: 0\r\n")
 })
+
+async_test(t => {
+  const client = new XMLHttpRequest();
+  client._onload_ = t.step_func_done(() => {
+    assert_equals(client.getAllResponseHeaders(), "www-authenticate: 1, 2, 3, 4\r\n");
+  });
+  client._onerror_ = t.unreached_func("unexpected error");
+  client.open("GET", "resources/headers-www-authenticate.asis");
+  client.send();
+});
 </script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any-expected.txt (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,4 @@
+
+PASS getResponseHeader('foo-test') 
+PASS getResponseHeader('www-authenticate') 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.html (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.js (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,19 @@
+async_test(t => {
+  const client = new XMLHttpRequest();
+  client._onload_ = t.step_func_done(() => {
+    assert_equals(client.getResponseHeader("foo-test"), "1, 2, 3");
+  });
+  client._onerror_ = t.unreached_func("unexpected error");
+  client.open("GET", "resources/headers-basic.asis");
+  client.send();
+}, "getResponseHeader('foo-test')");
+
+async_test(t => {
+  const client = new XMLHttpRequest();
+  client._onload_ = t.step_func_done(() => {
+    assert_equals(client.getResponseHeader("www-authenticate"), "1, 2, 3, 4");
+  });
+  client._onerror_ = t.unreached_func("unexpected error");
+  client.open("GET", "resources/headers-www-authenticate.asis");
+  client.send();
+}, "getResponseHeader('www-authenticate')");

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker-expected.txt (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,4 @@
+
+PASS getResponseHeader('foo-test') 
+PASS getResponseHeader('www-authenticate') 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker.html (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.worker.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,9 +1,7 @@
-Whitespace and null in response header values
 
-
-PASS Header value: hello_world\0 
-PASS Header value: \0hello_world 
-PASS Header value: hello\0world 
+FAIL Header value: hello world\0 assert_throws: function "() => client.send()" did not throw
+FAIL Header value: \0hello world assert_throws: function "() => client.send()" did not throw
+FAIL Header value: hello\0world assert_throws: function "() => client.send()" did not throw
 PASS Header value: __hello_world 
 PASS Header value: hello_world__ 
 PASS Header value: __hello_world__ 
@@ -12,7 +10,7 @@
 PASS Header value: [tab]hello_world[tab] 
 PASS Header value: hello______world 
 PASS Header value: hello[tab]world 
-PASS Header value: \0 
+FAIL Header value: \0 assert_throws: function "() => client.send()" did not throw
 PASS Header value: ___ 
 PASS Header value: [tab] 
 PASS Header value:  

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -3,13 +3,15 @@
 <title>Whitespace and null in header values</title>
 <script src=""
 <script src=""
-<script src=""
-
-<h1>Whitespace and null in response header values</h1>
-
 <div id=log></div>
-
 <script>
+function error(val) {
+  test(() => {
+    const client = new XMLHttpRequest();
+    client.open("GET", "resources/parse-headers.py?my-custom-header="+encodeURIComponent(val), false);
+    assert_throws("NetworkError", () => client.send());
+  }, "Header value: " + val.replace("\0", "\\0"));
+}
 
 function matchHeaderValue(val) {
     test(function () {
@@ -20,12 +22,12 @@
         var r = client.getResponseHeader("My-Custom-Header");
 
         assert_equals(r, trimmed);
-    }, "Header value: " + val.replace(/\t/g, "[tab]").replace(/ /g, "_").replace("\0", "\\0"));
+    }, "Header value: " + val.replace(/\t/g, "[tab]").replace(/ /g, "_"));
 }
 
-matchHeaderValue("hello world\0");
-matchHeaderValue("\0hello world");
-matchHeaderValue("hello\0world");
+error("hello world\0");
+error("\0hello world");
+error("hello\0world");
 matchHeaderValue("  hello world");
 matchHeaderValue("hello world  ");
 matchHeaderValue("  hello world  ");
@@ -34,9 +36,8 @@
 matchHeaderValue("\thello world\t");
 matchHeaderValue("hello      world");
 matchHeaderValue("hello\tworld");
-matchHeaderValue("\0");
+error("\0");
 matchHeaderValue("   ");
 matchHeaderValue("\t");
 matchHeaderValue("");
-
 </script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-abort.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-abort.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-abort.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,27 +9,69 @@
   <body>
     <div id="log"></div>
     <script>
-      var test = async_test()
-      test.step(function() {
+      test(function(t) {
         var client = new XMLHttpRequest(),
             result = [],
-            expected = [1,  4, 1] // open() -> 1,
-                                    // abort() -> 4, open() -> 1
-        client._onreadystatechange_ = function() {
-          test.step(function() {
-            result.push(client.readyState)
-          })
-        }
+            expected = [
+              'readystatechange', 0, 1,  // open()
+              'readystatechange', 2, 4,  // abort()
+              'abort',            2, 4,  // abort()
+              'loadend',          2, 4,  // abort()
+              'readystatechange', 3, 1,  // open()
+            ]
+
+        var state = 0
+
+        client._onreadystatechange_ = t.step_func(function() {
+          result.push('readystatechange', state, client.readyState)
+        })
+        client._onabort_ = t.step_func(function() {
+          // abort event must be fired synchronously from abort().
+          assert_equals(state, 2)
+
+          // readystatechange should be fired before abort.
+          assert_array_equals(result, [
+            'readystatechange', 0, 1,  // open()
+            'readystatechange', 2, 4,  // abort()
+          ])
+
+          // readyState should be set to unsent (0) at the very end of abort(),
+          // after this (and onloadend) is called.
+          assert_equals(client.readyState, 4)
+
+          result.push('abort', state, client.readyState)
+        })
+        client._onloadend_ = t.step_func(function() {
+          // abort event must be fired synchronously from abort().
+          assert_equals(state, 2)
+
+          // readystatechange should be fired before abort.
+          assert_array_equals(result, [
+            'readystatechange', 0, 1,  // open()
+            'readystatechange', 2, 4,  // abort()
+            'abort',            2, 4,  // abort()
+          ])
+
+          // readyState should be set to unsent (0) at the very end of abort(),
+          // after this is called.
+          assert_equals(client.readyState, 4)
+
+          result.push('loadend', state, client.readyState)
+        })
+
         client.open("GET", "resources/well-formed.xml")
         assert_equals(client.readyState, 1)
+
+        state = 1
         client.send(null)
+        state = 2
         client.abort()
         assert_equals(client.readyState, 0)
+        state = 3
         client.open("GET", "resources/well-formed.xml")
         assert_equals(client.readyState, 1)
         assert_array_equals(result, expected)
       })
-      test.done()
     </script>
   </body>
 </html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window-expected.txt (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,3 @@
+
+FAIL open() after window.stop() assert_unreached: loadend should not be fired after window.stop() and open() Reached unreachable code
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.html (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.js (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,43 @@
+// window.stop() below prevents the load event from firing, so wait until it is
+// fired to start the test.
+setup({explicit_done: true });
+
+_onload_ = () => {
+  async_test(function(t) {
+    const client = new XMLHttpRequest();
+
+    const result = [];
+    const expected = [
+      'readystatechange', 0, 1,  // open()
+    ];
+
+    let state = 0;
+
+    client._onreadystatechange_ = t.step_func(() => {
+      result.push('readystatechange', state, client.readyState);
+    });
+    client._onabort_ = t.unreached_func("abort should not be fired after window.stop() and open()");
+    client._onloadend_ = t.unreached_func("loadend should not be fired after window.stop() and open()");
+
+    client.open("GET", "resources/well-formed.xml");
+    assert_equals(client.readyState, 1);
+
+    state = 1;
+    client.send(null);
+    state = 2;
+    window.stop();
+    // Unlike client.abort(), window.stop() does not change readyState
+    // immediately, rather through a task...
+    assert_equals(client.readyState, 1);
+    state = 3;
+    // ... which is then canceled when we open a new request anyway.
+    client.open("GET", "resources/well-formed.xml");
+    assert_equals(client.readyState, 1);
+    assert_array_equals(result, expected);
+
+    // Give the abort and loadend events a chance to fire (erroneously) before
+    // calling this a success.
+    t.step_timeout(t.step_func_done(), 1000);
+  }, "open() after window.stop()");
+  done();
+};

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,5 +1,6 @@
 
-FAIL overrideMimeType() state needs to be reset across requests assert_equals: expected "Âð" but got "\ufffd\ufffd"
+PASS overrideMimeType() is not reset by open(), basic 
+PASS overrideMimeType() is not reset by open() 
 PASS If charset is not overridden by overrideMimeType() the original continues to be used 
 FAIL Charset can be overridden by overrideMimeType() with a bogus charset assert_equals: expected "\ufffd\ufffd" but got "Âð"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-edge-cases.window.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -2,6 +2,16 @@
 
 async_test(t => {
   const client = new XMLHttpRequest();
+  client._onload_ = t.step_func_done(() => {
+    assert_equals(client.responseText, "\uFFFD\uFFFD");
+  });
+  client.overrideMimeType("text/plain;charset=UTF-8");
+  client.open("GET", testURL);
+  client.send();
+}, "overrideMimeType() is not reset by open(), basic");
+
+async_test(t => {
+  const client = new XMLHttpRequest();
   let secondTime = false;
   client._onload_ = t.step_func(() => {
     if(!secondTime) {
@@ -10,7 +20,7 @@
       client.open("GET", testURL);
       client.send();
     } else {
-      assert_equals(client.responseText, "Âð");
+      assert_equals(client.responseText, "\uFFFD\uFFFD");
       t.done();
     }
   });
@@ -17,7 +27,7 @@
   client.open("GET", testURL);
   client.overrideMimeType("text/plain;charset=UTF-8")
   client.send();
-}, "overrideMimeType() state needs to be reset across requests");
+}, "overrideMimeType() is not reset by open()");
 
 async_test(t => {
   const client = new XMLHttpRequest();

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers-www-authenticate.asis (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers-www-authenticate.asis	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers-www-authenticate.asis	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,4 @@
+HTTP/1.1 280 HELLO
+www-authenticate: 1
+www-authenticate: 2
+www-authenticate: 3, 4

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/inspect-headers.py (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/inspect-headers.py	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/inspect-headers.py	2018-10-31 02:30:33 UTC (rev 237618)
@@ -5,11 +5,9 @@
             return "Syntax error: missing CRLF: " + line
         line = line[:-2]
 
-        if ':' not in line:
-            return "Syntax error: no colon found: " + line
-        name, value = line.split(':', 1)
-        if len(value) > 1 and value[0] == ' ':
-            value = value[1:]
+        if ': ' not in line:
+            return "Syntax error: no colon and space found: " + line
+        name, value = line.split(': ', 1)
 
         if filter_value:
             if value == filter_value:

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/responseXML-unavailable-in-worker.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/responseXML-unavailable-in-worker.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/responseXML-unavailable-in-worker.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -2,8 +2,8 @@
 
 test(function() {
     let xhr = new XMLHttpRequest();
-    assert_not_exists(xhr, "responseXML", "responseXML should not be available on instances.");
-    assert_not_exists(XMLHttpRequest.prototype, "responseXML", "responseXML should not be on the prototype.");
+    assert_false(xhr.hasOwnProperty("responseXML"), "responseXML should not be available on instances.");
+    assert_false(XMLHttpRequest.prototype.hasOwnProperty("responseXML"), "responseXML should not be on the prototype.");
 }, "XMLHttpRequest's responseXML property should not be exposed in workers.");
 
 done();

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/w3c-import.log (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/w3c-import.log	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/w3c-import.log	2018-10-31 02:30:33 UTC (rev 237618)
@@ -55,6 +55,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/header-content-length.asis
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/header-user-agent.py
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers-basic.asis
+/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers-www-authenticate.asis
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers.asis
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/headers.py
 /LayoutTests/imported/w3c/web-platform-tests/xhr/resources/image.gif

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-aborted.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-aborted.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-aborted.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -10,6 +10,6 @@
 Third request is set up to call abort() after TIME_NORMAL_LOAD, but it also has a TIME_REGULAR_TIMEOUT timeout. Asserts that timeout fired.
 (abort() is called later and should not fire an abort event per spec. This is untested!)
 */
-runTestRequests([ new AbortedRequest(false),
-                  new AbortedRequest(true, -1),
-                  new AbortedRequest(true, TIME_NORMAL_LOAD) ]);
+runTestRequests([ ["AbortedRequest", false, "only open()ed, not aborted"],
+                  ["AbortedRequest", true, "aborted immediately after send()", -1],
+                  ["AbortedRequest", true, "call abort() after TIME_NORMAL_LOAD", TIME_NORMAL_LOAD] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-abortedonmain.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-abortedonmain.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-abortedonmain.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -4,5 +4,5 @@
 one that will be aborted after TIME_DELAY, (with a timeout at TIME_REGULAR_TIMEOUT) asserts abort event fires. Does not assert that the timeout event does *not* fire.
 */
 
-runTestRequests([ new AbortedRequest(true, 0),
-                  new AbortedRequest(true, TIME_DELAY) ]);
+runTestRequests([ ["AbortedRequest", true, "abort() from a 0ms timeout", 0],
+                  ["AbortedRequest", true, "aborted after TIME_DELAY", TIME_DELAY] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overrides.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overrides.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overrides.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -6,6 +6,7 @@
 2) timeout first set to TIME_NORMAL_LOAD, after TIME_DELAY timeout is set to TIME_REGULAR_TIMEOUT, asserts load fires (race condition..?!?)
 3) timeout first set to 0, after TIME_REGULAR_TIMEOUT it is set to TIME_REGULAR_TIMEOUT * 10, asserts load fires
 */
-runTestRequests([ new RequestTracker(true, "timeout disabled after initially set", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, 0),
-                  new RequestTracker(true, "timeout overrides load after a delay", TIME_NORMAL_LOAD, TIME_DELAY, TIME_REGULAR_TIMEOUT),
-                  new RequestTracker(true, "timeout enabled after initially disabled", 0, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD * 10) ]);
+
+runTestRequests([ ["RequestTracker", true, "timeout disabled after initially set", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, 0],
+                  ["RequestTracker", true, "timeout overrides load after a delay", TIME_NORMAL_LOAD, TIME_DELAY, TIME_REGULAR_TIMEOUT],
+                  ["RequestTracker", true, "timeout enabled after initially disabled", 0, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD * 10] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overridesexpires.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overridesexpires.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-overridesexpires.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -7,6 +7,6 @@
         2) XHR with initial timeout set to TIME_NORMAL_LOAD, after TIME_REGULAR_TIMEOUT sets timeout to TIME_DELAY+100. Asserts "timeout" fires.
         3) XHR with initial timeout set to TIME_DELAY, after TIME_REGULAR_TIMEOUT sets timeout to 500ms. Asserts "timeout" fires (the change happens when timeout already fired and the request is done).
 */
-runTestRequests([ new RequestTracker(true, "timeout set to expiring value after load fires", TIME_NORMAL_LOAD, TIME_LATE_TIMEOUT, TIME_DELAY),
-                  new RequestTracker(true, "timeout set to expired value before load fires", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_DELAY+100),
-                  new RequestTracker(true, "timeout set to non-expiring value after timeout fires", TIME_DELAY, TIME_REGULAR_TIMEOUT, 500) ]);
+runTestRequests([ ["RequestTracker", true, "timeout set to expiring value after load fires", TIME_NORMAL_LOAD, TIME_LATE_TIMEOUT, TIME_DELAY],
+                  ["RequestTracker", true, "timeout set to expired value before load fires", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_DELAY+100],
+                  ["RequestTracker", true, "timeout set to non-expiring value after timeout fires", TIME_DELAY, TIME_REGULAR_TIMEOUT, 500] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-simple.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-simple.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-simple.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,6 +1,6 @@
 if (this.document === undefined)
   importScripts("xmlhttprequest-timeout.js");
 
-runTestRequests([ new RequestTracker(true, "no time out scheduled, load fires normally", 0),
-                  new RequestTracker(true, "load fires normally", TIME_NORMAL_LOAD),
-                  new RequestTracker(true, "timeout hit before load", TIME_REGULAR_TIMEOUT) ]);
+runTestRequests([ ["RequestTracker", true, "no time out scheduled, load fires normally", 0],
+                  ["RequestTracker", true, "load fires normally", TIME_NORMAL_LOAD],
+                  ["RequestTracker", true, "timeout hit before load", TIME_REGULAR_TIMEOUT] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconmain.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconmain.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconmain.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,2 +1,2 @@
-runTestRequests([ SyncRequestSettingTimeoutAfterOpen,
-                  SyncRequestSettingTimeoutBeforeOpen ]);
+runTestRequests([ ["SyncRequestSettingTimeoutAfterOpen", null, "timeout after open"],
+                  ["SyncRequestSettingTimeoutBeforeOpen", null, "timeout before open"] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconworker.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconworker.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-synconworker.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -6,6 +6,6 @@
 
 /* NOT TESTED: setting timeout before calling open( ... , false) in a worker context. The test code always calls open() first. */
 
-runTestRequests([ new RequestTracker(false, "no time out scheduled, load fires normally", 0),
-                  new RequestTracker(false, "load fires normally", TIME_NORMAL_LOAD),
-                  new RequestTracker(false, "timeout hit before load", TIME_REGULAR_TIMEOUT) ]);
+runTestRequests([ ["RequestTracker", false, "no time out scheduled, load fires normally", 0],
+                  ["RequestTracker", false, "load fires normally", TIME_NORMAL_LOAD],
+                  ["RequestTracker", false, "timeout hit before load", TIME_REGULAR_TIMEOUT] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-twice.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-twice.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout-twice.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,6 +1,6 @@
 if (this.document === undefined)
   importScripts("xmlhttprequest-timeout.js");
 
-runTestRequests([ new RequestTracker(true, "load fires normally with no timeout set, twice", 0, TIME_REGULAR_TIMEOUT, 0),
-                  new RequestTracker(true, "load fires normally with same timeout set twice", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD),
-                  new RequestTracker(true, "timeout fires normally with same timeout set twice", TIME_REGULAR_TIMEOUT, TIME_DELAY, TIME_REGULAR_TIMEOUT) ]);
+runTestRequests([ ["RequestTracker", true, "load fires normally with no timeout set, twice", 0, TIME_REGULAR_TIMEOUT, 0],
+                  ["RequestTracker", true, "load fires normally with same timeout set twice", TIME_NORMAL_LOAD, TIME_REGULAR_TIMEOUT, TIME_NORMAL_LOAD],
+                  ["RequestTracker", true, "timeout fires normally with same timeout set twice", TIME_REGULAR_TIMEOUT, TIME_DELAY, TIME_REGULAR_TIMEOUT] ]);

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout.js (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout.js	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/resources/xmlhttprequest-timeout.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -175,7 +175,7 @@
  * @param shouldAbort {Boolean} True if we should call abort at all.
  * @param abortDelay  {Number}  The time in ms to wait before calling abort().
  */
-function AbortedRequest(shouldAbort, abortDelay) {
+function AbortedRequest(shouldAbort, id, abortDelay) {
   this.shouldAbort = shouldAbort;
   this.abortDelay  = abortDelay;
   this.hasFired    = false;
@@ -264,8 +264,8 @@
   }
 };
 
-var SyncRequestSettingTimeoutAfterOpen = {
-  startXHR: function() {
+function SyncRequestSettingTimeoutAfterOpen() {
+  this.startXHR = function() {
     var pass = false;
     var req = new XMLHttpRequest();
     req.open("GET", STALLED_REQUEST_URL, false);
@@ -277,11 +277,12 @@
     }
     ok(pass, "Synchronous XHR must not allow a timeout to be set - setting timeout must throw");
     TestCounter.testComplete();
-  }
+  };
+  return this;
 };
 
-var SyncRequestSettingTimeoutBeforeOpen = {
-  startXHR: function() {
+function SyncRequestSettingTimeoutBeforeOpen() {
+  this.startXHR = function() {
     var pass = false;
     var req = new XMLHttpRequest();
     req.timeout = TIME_SYNC_TIMEOUT;
@@ -294,6 +295,7 @@
     ok(pass, "Synchronous XHR must not allow a timeout to be set - calling open() after timeout is set must throw");
     TestCounter.testComplete();
   }
+  return this;
 };
 
 var TestRequests = [];
@@ -320,6 +322,12 @@
 };
 
 function runTestRequests(testRequests) {
-    TestRequests = testRequests;
-    TestCounter.next();
+  if (location.search) {
+    testRequests = testRequests.filter(test => test[2] == decodeURIComponent(location.search.substr(1)));
+  }
+  TestRequests = testRequests.map(test => {
+    var constructor = test.shift();
+    return new self[constructor](...test)
+  });
+  TestCounter.next();
 }

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -3,18 +3,18 @@
 PASS header with invalid MIME type (empty string) is not changed 
 PASS known charset but bogus header - missing MIME type 
 PASS bogus charset and bogus header - missing MIME type 
-PASS Correct text/plain MIME with charset 
+FAIL If charset= param is UTF-8 (case-insensitive), it should not be changed assert_equals: expected "text/plain;charset=utf-8" but got "text/plain;charset=UTF-8"
 PASS If no charset= param is given, implementation should not add one - unknown MIME 
 PASS If no charset= param is given, implementation should not add one - known MIME 
 PASS If no charset= param is given, implementation should not add one - known MIME, unknown param, two spaces 
 FAIL charset given but wrong, fix it (unknown MIME, bogus charset) assert_equals: expected "text/x-thepiano;charset=UTF-8" but got "text/x-thepiano;charset= UTF-8"
-FAIL charset given but wrong, fix it (known MIME, bogus charset) assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;charset=UTF-8;charset=UTF-8"
+FAIL If charset= param is UTF-8 (case-insensitive), it should not be changed (bogus charset) assert_equals: expected "text/plain;charset=utf-8;charset=waddup" but got "text/plain;charset=UTF-8;charset=UTF-8"
 PASS charset given but wrong, fix it (known MIME, actual charset) 
-FAIL Multiple charset parameters deduplicate, bogus parameter dropped assert_equals: expected "text/x-pink-unicorn;charset=UTF-8" but got "text/x-pink-unicorn; charset=UTF-8; charset=UTF-8; notrelated; charset=UTF-8"
+FAIL Multiple non-UTF-8 charset parameters deduplicate, bogus parameter dropped assert_equals: expected "text/x-pink-unicorn;charset=UTF-8" but got "text/x-pink-unicorn; charset=UTF-8; charset=UTF-8; notrelated; charset=UTF-8"
 PASS No content type set, give MIME and charset 
-FAIL charset with space assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;charset= UTF-8"
-FAIL charset in double quotes assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;charset=\"UTF-8\""
+FAIL charset with space that is UTF-8 does not change assert_equals: expected "text/plain;charset= utf-8" but got "text/plain;charset= UTF-8"
+FAIL charset in double quotes that is UTF-8 does not change assert_equals: expected "text/plain;charset=\"utf-8\"" but got "text/plain;charset=\"UTF-8\""
 FAIL charset in double quotes with space assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;charset=\" UTF-8\""
-FAIL charset in double quotes with backslashes assert_equals: expected "text/plain;charset=UTF-8" but got "text/plain;charset=\"UTF-8\""
+FAIL charset in double quotes with backslashes that is UTF-8 does not change assert_equals: expected "text/plain;charset=\"u\\t\f-8\"" but got "text/plain;charset=\"UTF-8\""
 FAIL unknown parameters need to be preserved assert_equals: expected "yo/yo;charset=UTF-8;yo=YO;x=y" but got "YO/yo;charset=UTF-8;yo=YO; X=y"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-content-type-charset.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -4,8 +4,6 @@
     <title>XMLHttpRequest: send() - charset parameter of Content-Type</title>
     <script src=""
     <script src=""
-    <link rel="help" href="" data-tested-assertations="following::ol[1]/li[4]/p/code[contains(text(),'Content-Type')]/.. following::ol[1]/li[4]/p/code[contains(text(),'Content-Type')]/../following-sibling::p" />
-    <link rel="help" href="" data-tested-assertations="following::p[2]" />
   </head>
   <body>
     <div id="log"></div>
@@ -45,8 +43,8 @@
       )
       request(
         "text/plain;charset=utf-8",
-        "text/plain;charset=UTF-8",
-        "Correct text/plain MIME with charset"
+        "text/plain;charset=utf-8",
+        "If charset= param is UTF-8 (case-insensitive), it should not be changed"
       )
       request(
         "text/x-pink-unicorn",
@@ -70,8 +68,8 @@
       )
       request(
         "text/plain;charset=utf-8;charset=waddup",
-        "text/plain;charset=UTF-8",
-        "charset given but wrong, fix it (known MIME, bogus charset)"
+        "text/plain;charset=utf-8;charset=waddup",
+        "If charset= param is UTF-8 (case-insensitive), it should not be changed (bogus charset)"
       )
       request(
         "text/plain;charset=shift-jis",
@@ -81,7 +79,7 @@
       request(
         "text/x-pink-unicorn; charset=windows-1252; charset=bogus; notrelated; charset=ascii",
         "text/x-pink-unicorn;charset=UTF-8",
-        "Multiple charset parameters deduplicate, bogus parameter dropped"
+        "Multiple non-UTF-8 charset parameters deduplicate, bogus parameter dropped"
       )
       request(
         null,
@@ -90,12 +88,12 @@
       )
       request(
         "text/plain;charset= utf-8",
-        "text/plain;charset=UTF-8",
-        "charset with space")
+        "text/plain;charset= utf-8",
+        "charset with space that is UTF-8 does not change")
       request(
         "text/plain;charset=\"utf-8\"",
-        "text/plain;charset=UTF-8",
-        "charset in double quotes")
+        "text/plain;charset=\"utf-8\"",
+        "charset in double quotes that is UTF-8 does not change")
       request(
         "text/plain;charset=\" utf-8\"",
         "text/plain;charset=UTF-8",
@@ -102,8 +100,8 @@
         "charset in double quotes with space")
       request(
         "text/plain;charset=\"u\\t\\f-8\"",
-        "text/plain;charset=UTF-8",
-        "charset in double quotes with backslashes")
+        "text/plain;charset=\"u\\t\\f-8\"",
+        "charset in double quotes with backslashes that is UTF-8 does not change")
       request(
         "YO/yo;charset=x;yo=YO; X=y",
         "yo/yo;charset=UTF-8;yo=YO;x=y",

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any-expected.txt (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,5 @@
+
+FAIL XMLHttpRequest: send() with a stream on which getReader() is called assert_throws: function "() => client.send(stream)" did not throw
+FAIL XMLHttpRequest: send() with a stream on which read() is called assert_throws: function "() => client.send(stream)" did not throw
+FAIL XMLHttpRequest: send() with a stream on which read() and releaseLock() are called assert_throws: function "() => client.send(stream)" did not throw
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.html (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.js (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.js	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,27 @@
+// META: global=window,dedicatedworker,sharedworker
+
+function assert_xhr(stream) {
+  const client = new XMLHttpRequest();
+  client.open("POST", "...");
+  assert_throws(new TypeError(), () => client.send(stream));
+}
+
+test(() => {
+  const stream = new ReadableStream();
+  stream.getReader();
+  assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which getReader() is called");
+
+test(() => {
+  const stream = new ReadableStream();
+  stream.getReader().read();
+  assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which read() is called");
+
+promise_test(async () => {
+  const stream = new ReadableStream({ pull: c => c.enqueue(new Uint8Array()) }),
+        reader = stream.getReader();
+  await reader.read();
+  reader.releaseLock();
+  assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which read() and releaseLock() are called");

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker-expected.txt (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1,5 @@
+
+FAIL XMLHttpRequest: send() with a stream on which getReader() is called assert_throws: function "() => client.send(stream)" did not throw
+FAIL XMLHttpRequest: send() with a stream on which read() is called assert_throws: function "() => client.send(stream)" did not throw
+FAIL XMLHttpRequest: send() with a stream on which read() and releaseLock() are called assert_throws: function "() => client.send(stream)" did not throw
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker.html (0 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.worker.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-empty-value-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-empty-value-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-empty-value-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,5 +1,5 @@
 
-FAIL XMLHttpRequest: setRequestHeader() - empty header () assert_equals: expected "X-Empty: \n" but got "X-Empty:  \n"
+PASS XMLHttpRequest: setRequestHeader() - empty header () 
 PASS XMLHttpRequest: setRequestHeader() - empty header (null) 
 PASS XMLHttpRequest: setRequestHeader() - empty header (undefined) 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-whitespace-in-value-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-whitespace-in-value-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-allow-whitespace-in-value-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,5 +1,5 @@
 
-FAIL XMLHttpRequest: setRequestHeader() - header value with whitespace ( ) assert_equals: expected "X-Empty: \n" but got "X-Empty:  \n"
+PASS XMLHttpRequest: setRequestHeader() - header value with whitespace ( ) 
 PASS XMLHttpRequest: setRequestHeader() - header value with whitespace ( t) 
 PASS XMLHttpRequest: setRequestHeader() - header value with whitespace (t ) 
 PASS XMLHttpRequest: setRequestHeader() - header value with whitespace ( t ) 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -2,37 +2,37 @@
 CONSOLE MESSAGE: line 22: ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
 CONSOLE MESSAGE: line 22: ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead.
 
-FAIL setRequestHeader("") sends a blank string assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
-FAIL setRequestHeader(" ") sends the string " " assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS setRequestHeader("") sends a blank string 
+PASS setRequestHeader(" ") sends the string " " 
 PASS setRequestHeader(null) sends the string "null" 
 PASS setRequestHeader(undefined) sends the string "undefined" 
 PASS String request has correct default Content-Type of "text/plain;charset=UTF-8" 
 PASS String request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8 
-FAIL XML Document request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS XML Document request respects setRequestHeader("") 
 PASS XML Document request has correct default Content-Type of "application/xml;charset=UTF-8" 
 PASS XML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8 
-FAIL HTML Document request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS HTML Document request respects setRequestHeader("") 
 PASS HTML Document request has correct default Content-Type of "text/html;charset=UTF-8" 
 PASS HTML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8 
-FAIL Blob request respects setRequestHeader("") to be specified assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
-FAIL Blob request with unset type sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type:  \n"
+PASS Blob request respects setRequestHeader("") to be specified 
+FAIL Blob request with unset type sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type: \n"
 PASS Blob request with unset type keeps setRequestHeader() Content-Type and charset 
-FAIL Blob request with set type respects setRequestHeader("") to be specified assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS Blob request with set type respects setRequestHeader("") to be specified 
 PASS Blob request with set type uses that it for Content-Type unless setRequestHeader() 
 PASS Blob request with set type keeps setRequestHeader() Content-Type and charset 
-FAIL ArrayBuffer request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS ArrayBuffer request respects setRequestHeader("") 
 FAIL ArrayBuffer request sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type: application/x-www-form-urlencoded\n"
 PASS ArrayBuffer request keeps setRequestHeader() Content-Type and charset 
-FAIL ArrayBufferView request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS ArrayBufferView request respects setRequestHeader("") 
 FAIL ArrayBufferView request sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type: application/x-www-form-urlencoded\n"
 PASS ArrayBufferView request keeps setRequestHeader() Content-Type and charset 
-FAIL FormData request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS FormData request respects setRequestHeader("") 
 PASS FormData request has correct default Content-Type of "multipart/form-data; boundary=_" 
 PASS FormData request keeps setRequestHeader() Content-Type and charset 
-FAIL URLSearchParams respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS URLSearchParams respects setRequestHeader("") 
 FAIL URLSearchParams request has correct default Content-Type of "application/x-www-form-urlencoded;charset=UTF-8" assert_equals: expected "Content-Type: application/x-www-form-urlencoded;charset=UTF-8\n" but got "Content-Type: text/plain;charset=UTF-8\n"
 PASS URLSearchParams request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8 
-FAIL ReadableStream request respects setRequestHeader("") assert_equals: expected "Content-Type: \n" but got "Content-Type:  \n"
+PASS ReadableStream request respects setRequestHeader("") 
 FAIL ReadableStream request with under type sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type: text/plain;charset=UTF-8\n"
 FAIL ReadableStream request keeps setRequestHeader() Content-Type and charset assert_equals: expected "Content-Type: application/xml;charset=ASCII\n" but got "Content-Type: application/xml;charset=UTF-8\n"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -8,4 +8,5 @@
 PASS XMLHttpRequest: setRequestHeader() - headers that are allowed (If) 
 PASS XMLHttpRequest: setRequestHeader() - headers that are allowed (Status-URI) 
 PASS XMLHttpRequest: setRequestHeader() - headers that are allowed (X-Pink-Unicorn) 
+PASS XMLHttpRequest: setRequestHeader() - headers that are allowed (!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyz) 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed.htm (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed.htm	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-header-allowed.htm	2018-10-31 02:30:33 UTC (rev 237618)
@@ -28,6 +28,7 @@
       request("If")
       request("Status-URI")
       request("X-Pink-Unicorn")
+      request("!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyz")
     </script>
   </body>
 </html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/timeout-multiple-fetches.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/timeout-multiple-fetches.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/timeout-multiple-fetches.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -3,12 +3,13 @@
 <script src=""
 <script src=""
 <script src=""
+<script src=""
 <div id=log></div>
 <script>
 async_test(t => {
   const client = new XMLHttpRequest
   client.open("GET", "resources/redirect.py?delay=500&location=delay.py") // 500 + 500 = 1000
-  client.timeout = 1000
+  client.timeout = 750
   client.send()
   client._ontimeout_ = t.step_func_done(() => {
     assert_equals(client.readyState, 4)
@@ -17,9 +18,11 @@
 }, "Redirects should not reset the timer")
 
 async_test(t => {
+  // Use a unique ID to prevent caching of the preflight making the test flaky.
+  const uuid = token();
   const client = new XMLHttpRequest
-  client.open("YO", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/delay.py")
-  client.timeout = 1000
+  client.open("YO", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/delay.py?uuid=" + uuid)
+  client.timeout = 750
   client.send()
   client._ontimeout_ = t.step_func_done(() => {
     assert_equals(client.readyState, 4)

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/w3c-import.log (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/w3c-import.log	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/w3c-import.log	2018-10-31 02:30:33 UTC (rev 237618)
@@ -119,6 +119,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader-server-date.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader-special-characters.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader-unsent-opened-state.htm
+/LayoutTests/imported/w3c/web-platform-tests/xhr/getresponseheader.any.js
 /LayoutTests/imported/w3c/web-platform-tests/xhr/header-user-agent-async.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/header-user-agent-sync.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/headers-normalize-response.htm
@@ -128,6 +129,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/xhr/no-utf16-json.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-abort.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-setrequestheader.htm
+/LayoutTests/imported/w3c/web-platform-tests/xhr/open-after-stop.window.js
 /LayoutTests/imported/w3c/web-platform-tests/xhr/open-during-abort-event.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/open-during-abort-processing.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/open-during-abort.htm
@@ -220,6 +222,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-blob.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-es-object.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-formdata.htm
+/LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-readablestream.any.js
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-data-unexpected-tostring.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-entity-body-basic.htm
 /LayoutTests/imported/w3c/web-platform-tests/xhr/send-entity-body-document-bogus.htm

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-aborted.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-aborted.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-aborted.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -12,6 +12,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?only open()ed, not aborted">
+    <meta name=variant content="?aborted immediately after send()">
+    <meta name=variant content="?call abort() after TIME_NORMAL_LOAD">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-abortedonmain.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-abortedonmain.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-abortedonmain.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -8,6 +8,8 @@
     <link rel="help" href="" data-tested-assertations="../.." />
     <link rel="help" href="" data-tested-assertations="following::ol/li[9]"/>
     <meta name=timeout content=long>
+    <meta name=variant content="?abort() from a 0ms timeout">
+    <meta name=variant content="?aborted after TIME_DELAY">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overrides.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overrides.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overrides.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -8,6 +8,9 @@
     <link rel="help" href="" data-tested-assertations=".."/>
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <meta name=timeout content=long>
+    <meta name=variant content="?timeout disabled after initially set">
+    <meta name=variant content="?timeout overrides load after a delay">
+    <meta name=variant content="?timeout enabled after initially disabled">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overridesexpires.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overridesexpires.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-overridesexpires.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?timeout set to expiring value after load fires">
+    <meta name=variant content="?timeout set to expired value before load fires">
+    <meta name=variant content="?timeout set to non-expiring value after timeout fires">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-simple.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-simple.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-simple.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?no time out scheduled, load fires normally">
+    <meta name=variant content="?load fires normally">
+    <meta name=variant content="?timeout hit before load">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain-expected.txt (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain-expected.txt	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain-expected.txt	2018-10-31 02:30:33 UTC (rev 237618)
@@ -1,5 +1,5 @@
-CONSOLE MESSAGE: line 314: XMLHttpRequest.timeout cannot be set for synchronous HTTP(S) requests made from the window context.
-CONSOLE MESSAGE: line 289: Synchronous XMLHttpRequests must not have a timeout value set.
+CONSOLE MESSAGE: line 316: XMLHttpRequest.timeout cannot be set for synchronous HTTP(S) requests made from the window context.
+CONSOLE MESSAGE: line 290: Synchronous XMLHttpRequests must not have a timeout value set.
 Description
 
 This test validates that the XHR2 timeout property behaves as expected in async cases in document (i.e. non-worker) context.

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-synconmain.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -6,6 +6,8 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[1]" />
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[10]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?timeout after open">
+    <meta name=variant content="?timeout before open">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-twice.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-twice.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-twice.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -10,6 +10,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?load fires normally with no timeout set, twice">
+    <meta name=variant content="?load fires normally with same timeout set twice">
+    <meta name=variant content="?timeout fires normally with same timeout set twice">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-aborted.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-aborted.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-aborted.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -12,6 +12,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?only open()ed, not aborted">
+    <meta name=variant content="?aborted immediately after send()">
+    <meta name=variant content="?call abort() after TIME_NORMAL_LOAD">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overrides.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overrides.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overrides.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -8,6 +8,9 @@
     <link rel="help" href="" data-tested-assertations=".."/>
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <meta name=timeout content=long>
+    <meta name=variant content="?timeout disabled after initially set">
+    <meta name=variant content="?timeout overrides load after a delay">
+    <meta name=variant content="?timeout enabled after initially disabled">
     <script src=""
     <script src=""
     <script src=""
@@ -17,7 +20,7 @@
     <p>This test validates that the XHR2 timeout property behaves as expected in in a worker context.</p>
     <div id="log"></div>
     <script type="text/_javascript_">
-        var worker = new Worker("resources/xmlhttprequest-timeout-overrides.js");
+        var worker = new Worker("resources/xmlhttprequest-timeout-overrides.js" + location.search);
         worker.addEventListener("message", testResultCallbackHandler);
     </script>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overridesexpires.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overridesexpires.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-overridesexpires.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?timeout set to expiring value after load fires">
+    <meta name=variant content="?timeout set to expired value before load fires">
+    <meta name=variant content="?timeout set to non-expiring value after timeout fires">
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-simple.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-simple.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-simple.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?no time out scheduled, load fires normally">
+    <meta name=variant content="?load fires normally">
+    <meta name=variant content="?timeout hit before load">
     <script src=""
     <script src=""
     <script src=""
@@ -18,7 +21,7 @@
     <p>This test validates that the XHR2 timeout property behaves as expected in in a worker context.</p>
     <div id="log"></div>
     <script type="text/_javascript_">
-        var worker = new Worker("resources/xmlhttprequest-timeout-simple.js");
+        var worker = new Worker("resources/xmlhttprequest-timeout-simple.js" + location.search);
         worker._onmessage_ = testResultCallbackHandler;
     </script>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-synconworker.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-synconworker.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-synconworker.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?no time out scheduled, load fires normally">
+    <meta name=variant content="?load fires normally">
+    <meta name=variant content="?timeout hit before load">
     <script src=""
     <script src=""
     <script src=""
@@ -18,7 +21,7 @@
     <p>This test validates that the XHR2 timeout property behaves as expected in in a worker context.</p>
     <div id="log"></div>
     <script type="text/_javascript_">
-        var worker = new Worker("resources/xmlhttprequest-timeout-synconworker.js");
+        var worker = new Worker("resources/xmlhttprequest-timeout-synconworker.js" + location.search);
         worker.addEventListener("message", testResultCallbackHandler);
     </script>
 </body>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html (237617 => 237618)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html	2018-10-31 02:29:53 UTC (rev 237617)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/xmlhttprequest-timeout-worker-twice.html	2018-10-31 02:30:33 UTC (rev 237618)
@@ -9,6 +9,9 @@
     <link rel="help" href="" data-tested-assertations="following::ol[1]/li[9]"/>
     <link rel="help" href="" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
     <meta name=timeout content=long>
+    <meta name=variant content="?load fires normally with no timeout set, twice">
+    <meta name=variant content="?load fires normally with same timeout set twice">
+    <meta name=variant content="?timeout fires normally with same timeout set twice">
     <script src=""
     <script src=""
     <script src=""
@@ -18,7 +21,7 @@
     <p>This test validates that the XHR2 timeout property behaves as expected in in a worker context.</p>
     <div id="log"></div>
     <script type="text/_javascript_">
-        var worker = new Worker("resources/xmlhttprequest-timeout-twice.js");
+        var worker = new Worker("resources/xmlhttprequest-timeout-twice.js" + location.search);
         worker.addEventListener("message", testResultCallbackHandler);
     </script>
 </body>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to