Diff
Modified: trunk/LayoutTests/ChangeLog (220730 => 220731)
--- trunk/LayoutTests/ChangeLog 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/ChangeLog 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,3 +1,26 @@
+2017-08-14 Chris Dumez <cdu...@apple.com>
+
+ XHR should only fire an abort event if the cancellation was requested by the client
+ https://bugs.webkit.org/show_bug.cgi?id=175546
+
+ Reviewed by Youenn Fablet.
+
+ * http/tests/navigation/page-cache-xhr-expected.txt:
+ * http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt: Copied from LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt.
+ * http/tests/navigation/page-cache-xhr-in-pagehide.html: Copied from LayoutTests/http/tests/navigation/page-cache-xhr.html.
+ * http/tests/navigation/page-cache-xhr.html:
+ When an XHR is pending and navigating away, we would send an abort event before the navigation and an error event after
+ restoring from PageCache. This bug was not seen before because the test only checked for error events, not abort ones.
+ The expected behavior is now that we fire an error event before navigating away, similar to the non-PageCache case.
+ The only case where the error event should be fired after restoring from PageCache is when an XHR is done in the pagehide
+ event handler, because it is too late to send the error event to the page before navigating in this case. I added test
+ coverage for this case.
+
+ * http/tests/xmlhttprequest/navigation-should-abort-expected.txt:
+ * http/tests/xmlhttprequest/navigation-should-abort.html:
+ This test was expecting an abort event on navigation which is against spec. This test was failing in Blink too.
+ Update the test to expect an error event instead.
+
2017-08-14 Simon Fraser <simon.fra...@apple.com>
Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
Modified: trunk/LayoutTests/fast/frames/frame-unload-crash-expected.txt (220730 => 220731)
--- trunk/LayoutTests/fast/frames/frame-unload-crash-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/fast/frames/frame-unload-crash-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,4 @@
frame "<!--framePath //<!--frame0-->/<!--frame0-->-->" - has 1 onunload handler(s)
-CONSOLE MESSAGE: line 13: XMLHttpRequest cannot load frame-unload-crash-2.html due to access control checks.
This is a test for bug 25136: CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame. If successful, PASS should be printed below.
PASS
Modified: trunk/LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt (220730 => 220731)
--- trunk/LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -4,11 +4,11 @@
pageshow - not from cache
+PASS Executed the XHR error handler before entering PageCache
+PASS xhr.status is 0
pagehide - entering cache
pageshow - from cache
PASS Page did enter and was restored from the page cache
-PASS Executed the XHR error handler after restoring from page cache
-PASS xhr.status is 0
PASS successfullyParsed is true
TEST COMPLETE
Copied: trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt (from rev 220730, trunk/LayoutTests/http/tests/navigation/page-cache-xhr-expected.txt) (0 => 220731)
--- trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -0,0 +1,16 @@
+CONSOLE MESSAGE: line 35: XMLHttpRequest cannot load http://127.0.0.1:8000/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain due to access control checks.
+Tests that a page with a loading XMLHttpRequest goes into the page cache.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+pageshow - not from cache
+pagehide - entering cache
+pageshow - from cache
+PASS Page did enter and was restored from the page cache
+PASS Executed the XHR error handler after restoring from PageCache
+PASS xhr.status is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html (from rev 220730, trunk/LayoutTests/http/tests/navigation/page-cache-xhr.html) (0 => 220731)
--- trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html (rev 0)
+++ trunk/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html 2017-08-15 01:36:04 UTC (rev 220731)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description('Tests that a page with a loading XMLHttpRequest goes into the page cache.');
+window.jsTestIsAsync = true;
+
+var restoredFromPageCache = false;
+
+if (window.testRunner)
+ testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+
+window.addEventListener("pageshow", function(event) {
+ debug("pageshow - " + (event.persisted ? "" : "not ") + "from cache");
+
+ if (event.persisted) {
+ testPassed("Page did enter and was restored from the page cache");
+ restoredFromPageCache = true;
+ }
+}, false);
+
+window.addEventListener("pagehide", function(event) {
+ debug("pagehide - " + (event.persisted ? "" : "not ") + "entering cache");
+ if (!event.persisted) {
+ testFailed("Page did not enter the page cache.");
+ finishJSTest();
+ }
+ xhr = new XMLHttpRequest();
+ xhr._onload_ = xhrLoaded;
+ xhr._onabort_ = xhrAbort;
+ xhr._onerror_ = xhrError;
+ // Slow loading XHR (3-second stall).
+ xhr.open("GET", "/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain", true);
+ xhr.send();
+}, false);
+
+function xhrLoaded()
+{
+ testFailed("The XMLHttpRequest should not haved loaded");
+ finishJSTest();
+}
+
+function xhrAbort() {
+ testFailed("Executed the XHR abort handler unexpectedly");
+ finishJSTest();
+}
+
+function xhrError() {
+ if (restoredFromPageCache)
+ testPassed("Executed the XHR error handler after restoring from PageCache");
+ else
+ testFailed("Executed the XHR error handler before entering PageCache");
+ shouldBe("xhr.status", "0");
+ finishJSTest();
+}
+
+window.addEventListener('load', function() {
+ // This needs to happen in a setTimeout because a navigation inside the onload handler would
+ // not create a history entry.
+ setTimeout(function() {
+ // Force a back navigation back to this page.
+ window.location.href = ""
+ }, 0);
+}, false);
+
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/http/tests/navigation/page-cache-xhr.html (220730 => 220731)
--- trunk/LayoutTests/http/tests/navigation/page-cache-xhr.html 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/http/tests/navigation/page-cache-xhr.html 2017-08-15 01:36:04 UTC (rev 220731)
@@ -17,6 +17,7 @@
if (event.persisted) {
testPassed("Page did enter and was restored from the page cache");
restoredFromPageCache = true;
+ setTimeout(finishJSTest, 0);
}
}, false);
@@ -34,19 +35,25 @@
finishJSTest();
}
+function xhrAbort() {
+ testFailed("Executed the XHR abort handler unexpectedly");
+ finishJSTest();
+}
+
function xhrError() {
- if (restoredFromPageCache)
- testPassed("Executed the XHR error handler after restoring from page cache");
- else
- testFailed("Executed the XHR error handler before restoring from page cache");
+ if (restoredFromPageCache) {
+ testFailed("Executed the XHR error handler after restoring from PageCache");
+ return;
+ }
+ testPassed("Executed the XHR error handler before entering PageCache");
shouldBe("xhr.status", "0");
- finishJSTest();
}
window.addEventListener('load', function() {
xhr = new XMLHttpRequest();
xhr._onload_ = xhrLoaded;
+ xhr._onabort_ = xhrAbort;
xhr._onerror_ = xhrError;
// Slow loading XHR (3-second stall).
xhr.open("GET", "/resources/load-and-stall.cgi?name=load-and-stall.cgi&stallFor=3&stallAt=0&mimeType=text/plain", true);
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort-expected.txt (220730 => 220731)
--- trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: line 14: PASS: Expected 'abort', got 'abort'.
+CONSOLE MESSAGE: line 11: PASS: Expected 'error', got 'error'.
If this text shows up, you've successfully navigated to 'navigation-target.html'.
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort.html (220730 => 220731)
--- trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort.html 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/navigation-should-abort.html 2017-08-15 01:36:04 UTC (rev 220731)
@@ -8,10 +8,10 @@
var req = new XMLHttpRequest();
req.open("GET", "resources/endlessxml.php");
req._onerror_ = function () {
- console.log("FAIL: Expected 'abort', got 'error'.");
+ console.log("PASS: Expected 'error', got 'error'.");
};
req._onabort_ = function () {
- console.log("PASS: Expected 'abort', got 'abort'.");
+ console.log("FAIL: Expected 'error', got 'abort'.");
};
req.send(null);
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,31 @@
2017-08-14 Chris Dumez <cdu...@apple.com>
+ XHR should only fire an abort event if the cancellation was requested by the client
+ https://bugs.webkit.org/show_bug.cgi?id=175546
+
+ Reviewed by Youenn Fablet.
+
+ Rebaseline several WPT tests now that a different error is sometimes used and that
+ more checks are passing.
+
+ * web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt:
+ * web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
+ * web-platform-tests/cors/allow-headers-expected.txt:
+ * web-platform-tests/cors/origin-expected.txt:
+ * web-platform-tests/cors/request-headers-expected.txt:
+ * web-platform-tests/cors/response-headers-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_multi-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_null-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_origin-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_space-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt:
+ * web-platform-tests/resource-timing/resource_TAO_zero-expected.txt:
+
+2017-08-14 Chris Dumez <cdu...@apple.com>
+
Unreviewed, rollout r220622 & r220696
https://bugs.webkit.org/show_bug.cgi?id=175482
<rdar://problem/33860695>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,3 +1,3 @@
-FAIL XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil) assert_true: should get an error event expected true got false
+PASS XMLHttpRequest: open() resolving URLs (multi-Window; 4; evil)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,7 +1,4 @@
Blocked access to external URL http://nonexistent-origin.localhost}:8800/
-FAIL XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) assert_throws: function "function ()
- {
- xhr.send("Test Message");
- }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
+PASS XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cors/allow-headers-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/cors/allow-headers-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cors/allow-headers-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -45,48 +45,48 @@
Access-Control-Allow-Headers handling
-FAIL Allow origin: * The operation was aborted.
-FAIL Allow origin: _*__ The operation was aborted.
-FAIL Allow origin: [tab]* The operation was aborted.
-FAIL Allow origin: http://localhost:8800 The operation was aborted.
-FAIL Allow origin: _http://localhost:8800 The operation was aborted.
-FAIL Allow origin: _http://localhost:8800___[tab]_ The operation was aborted.
-FAIL Allow origin: [tab]http://localhost:8800 The operation was aborted.
-FAIL Disallow origin: http://www1.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: //localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ftp://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:/localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800? assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800 / assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800# assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800%23 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800:80 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800, * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: HTTP://LOCALHOST:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: HTTP://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: - assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ** assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: \0* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: '*' assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: "*" assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: * * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *http://* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: * http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *, http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: \0http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: null http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://example.net assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/cors/allow-headers.htm assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://www1.localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
+FAIL Allow origin: * A network error occurred.
+FAIL Allow origin: _*__ A network error occurred.
+FAIL Allow origin: [tab]* A network error occurred.
+FAIL Allow origin: http://localhost:8800 A network error occurred.
+FAIL Allow origin: _http://localhost:8800 A network error occurred.
+FAIL Allow origin: _http://localhost:8800___[tab]_ A network error occurred.
+FAIL Allow origin: [tab]http://localhost:8800 A network error occurred.
+PASS Disallow origin: http://www1.localhost:8800
+PASS Disallow origin: //localhost:8800
+PASS Disallow origin: ://localhost:8800
+PASS Disallow origin: ftp://localhost:8800
+PASS Disallow origin: http:://localhost:8800
+PASS Disallow origin: http:/localhost:8800
+PASS Disallow origin: http:localhost:8800
+PASS Disallow origin: localhost:8800
+PASS Disallow origin: http://localhost:8800?
+PASS Disallow origin: http://localhost:8800/
+PASS Disallow origin: http://localhost:8800 /
+PASS Disallow origin: http://localhost:8800#
+PASS Disallow origin: http://localhost:8800%23
+PASS Disallow origin: http://localhost:8800:80
+PASS Disallow origin: http://localhost:8800, *
+PASS Disallow origin: http://localhost:8800\0
+PASS Disallow origin: HTTP://LOCALHOST:8800
+PASS Disallow origin: HTTP://localhost:8800
+PASS Disallow origin: -
+PASS Disallow origin: **
+PASS Disallow origin: \0*
+PASS Disallow origin: *\0
+PASS Disallow origin: '*'
+PASS Disallow origin: "*"
+PASS Disallow origin: * *
+PASS Disallow origin: *http://*
+PASS Disallow origin: *http://localhost:8800
+PASS Disallow origin: * http://localhost:8800
+PASS Disallow origin: *, http://localhost:8800
+PASS Disallow origin: \0http://localhost:8800
+PASS Disallow origin: null http://localhost:8800
+PASS Disallow origin: http://example.net
+PASS Disallow origin: null
+PASS Disallow origin:
+PASS Disallow origin: http://localhost:8800/cors/allow-headers.htm
+PASS Disallow origin: http://localhost:8800/cors/
+PASS Disallow origin: http://www1.localhost:8800/cors/
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cors/origin-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/cors/origin-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cors/origin-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -61,62 +61,62 @@
Harness Error (FAIL), message = 1 duplicate test name: "Disallow origin: localhost:8800"
-FAIL Allow origin: * The operation was aborted.
-FAIL Allow origin: _*__ The operation was aborted.
-FAIL Allow origin: [tab]* The operation was aborted.
-FAIL Allow origin: http://localhost:8800 The operation was aborted.
-FAIL Allow origin: _http://localhost:8800 The operation was aborted.
-FAIL Allow origin: _http://localhost:8800___[tab]_ The operation was aborted.
-FAIL Allow origin: [tab]http://localhost:8800 The operation was aborted.
-FAIL Disallow origin: http://www1.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: //localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ftp://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:/localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http:localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800? assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800 / assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800# assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800%23 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800:80 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800, * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: HTTP://LOCALHOST:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: HTTP://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: - assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: ** assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: \0* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *\0 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: '*' assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: "*" assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: * * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: * null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *http://* assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: * http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *, http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: \0http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: null http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://example.net assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: null assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: null * assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/cors/origin.htm assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://www1.localhost:8800/cors/ assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: .localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: *.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow origin: http://*.localhost:8800 assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (, *) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (*, ) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (*, *) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (*, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
-FAIL Disallow multiple headers (http://localhost:8800, http://localhost:8800) assert_throws: send function "function () { client.send() }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
+FAIL Allow origin: * A network error occurred.
+FAIL Allow origin: _*__ A network error occurred.
+FAIL Allow origin: [tab]* A network error occurred.
+FAIL Allow origin: http://localhost:8800 A network error occurred.
+FAIL Allow origin: _http://localhost:8800 A network error occurred.
+FAIL Allow origin: _http://localhost:8800___[tab]_ A network error occurred.
+FAIL Allow origin: [tab]http://localhost:8800 A network error occurred.
+PASS Disallow origin: http://www1.localhost:8800
+PASS Disallow origin: //localhost:8800
+PASS Disallow origin: ://localhost:8800
+PASS Disallow origin: ftp://localhost:8800
+PASS Disallow origin: http:://localhost:8800
+PASS Disallow origin: http:/localhost:8800
+PASS Disallow origin: http:localhost:8800
+PASS Disallow origin: localhost:8800
+PASS Disallow origin: http://localhost:8800?
+PASS Disallow origin: http://localhost:8800/
+PASS Disallow origin: http://localhost:8800 /
+PASS Disallow origin: http://localhost:8800#
+PASS Disallow origin: http://localhost:8800%23
+PASS Disallow origin: http://localhost:8800:80
+PASS Disallow origin: http://localhost:8800, *
+PASS Disallow origin: http://localhost:8800\0
+PASS Disallow origin: HTTP://LOCALHOST:8800
+PASS Disallow origin: HTTP://localhost:8800
+PASS Disallow origin: -
+PASS Disallow origin: **
+PASS Disallow origin: \0*
+PASS Disallow origin: *\0
+PASS Disallow origin: '*'
+PASS Disallow origin: "*"
+PASS Disallow origin: * *
+PASS Disallow origin: * null
+PASS Disallow origin: *http://*
+PASS Disallow origin: *http://localhost:8800
+PASS Disallow origin: * http://localhost:8800
+PASS Disallow origin: *, http://localhost:8800
+PASS Disallow origin: \0http://localhost:8800
+PASS Disallow origin: null http://localhost:8800
+PASS Disallow origin: http://example.net
+PASS Disallow origin: null
+PASS Disallow origin: null *
+PASS Disallow origin:
+PASS Disallow origin: http://localhost:8800/cors/origin.htm
+PASS Disallow origin: http://localhost:8800/cors/
+PASS Disallow origin: http://www1.localhost:8800/cors/
+PASS Disallow origin: localhost:8800
+PASS Disallow origin: .localhost:8800
+PASS Disallow origin: *.localhost:8800
+PASS Disallow origin: http://localhost:8800
+PASS Disallow origin: http://.localhost:8800
+PASS Disallow origin: http://*.localhost:8800
+PASS Disallow multiple headers (, *)
+PASS Disallow multiple headers (*, )
+PASS Disallow multiple headers (*, *)
+PASS Disallow multiple headers (, http://localhost:8800)
+PASS Disallow multiple headers (*, http://localhost:8800)
+PASS Disallow multiple headers (http://localhost:8800, http://localhost:8800)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cors/request-headers-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/cors/request-headers-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cors/request-headers-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -15,5 +15,5 @@
PASS Unspecified request headers are disallowed
FAIL Strange allowheaders (case insensitive) A network error occurred.
PASS INVALID_STATE_ERR on setRequestHeader before open()
-FAIL INVALID_STATE_ERR on setRequestHeader after send() The operation was aborted.
+FAIL INVALID_STATE_ERR on setRequestHeader after send() A network error occurred.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cors/response-headers-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/cors/response-headers-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cors/response-headers-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -17,19 +17,19 @@
Response headers
-FAIL getResponseHeader: Expose Access-Control-Expose-Headers (x-custom-header-comma) The operation was aborted.
-FAIL getResponseHeader: Expose second Access-Control-Expose-Headers (x-second-expose) The operation was aborted.
-FAIL getResponseHeader: Don't trim whitespace The operation was aborted.
-FAIL getResponseHeader: x-custom-header bytes The operation was aborted.
-FAIL getResponseHeader: Exposed server field readable (Date) The operation was aborted.
-FAIL getResponseHeader: Cache-Control: readable by default The operation was aborted.
-FAIL getResponseHeader: Content-Language: readable by default The operation was aborted.
-FAIL getResponseHeader: Expires: readable by default The operation was aborted.
-FAIL getResponseHeader: Last-Modified: readable by default The operation was aborted.
-FAIL getResponseHeader: Pragma: readable by default The operation was aborted.
-FAIL getResponseHeader: Server: unreadable by default The operation was aborted.
-FAIL getResponseHeader: X-Powered-By: unreadable by default The operation was aborted.
+FAIL getResponseHeader: Expose Access-Control-Expose-Headers (x-custom-header-comma) A network error occurred.
+FAIL getResponseHeader: Expose second Access-Control-Expose-Headers (x-second-expose) A network error occurred.
+FAIL getResponseHeader: Don't trim whitespace A network error occurred.
+FAIL getResponseHeader: x-custom-header bytes A network error occurred.
+FAIL getResponseHeader: Exposed server field readable (Date) A network error occurred.
+FAIL getResponseHeader: Cache-Control: readable by default A network error occurred.
+FAIL getResponseHeader: Content-Language: readable by default A network error occurred.
+FAIL getResponseHeader: Expires: readable by default A network error occurred.
+FAIL getResponseHeader: Last-Modified: readable by default A network error occurred.
+FAIL getResponseHeader: Pragma: readable by default A network error occurred.
+FAIL getResponseHeader: Server: unreadable by default A network error occurred.
+FAIL getResponseHeader: X-Powered-By: unreadable by default A network error occurred.
FAIL getResponseHeader: Combined testing of cors response headers assert_equals: x-custom-header expected (string) "test, test" but got (object) null
-FAIL getResponse: don't expose x-nonexposed The operation was aborted.
-FAIL getAllResponseHeaders: don't expose x-nonexposed The operation was aborted.
+FAIL getResponse: don't expose x-nonexposed A network error occurred.
+FAIL getAllResponseHeaders: don't expose x-nonexposed A network error occurred.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=match_origin
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value list contains a case-sensitive match for the value of the origin of the current document.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=match_wildcard
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value list contains a wildcard ("*").
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_multi-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_multi-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_multi-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=multi
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will pass when the HTTP response has multiple Timing-Allow-Origin header fields and the subsequent field value is separated by a comma.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_null-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_null-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_null-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=null
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will fail when the value of Timing-Allow-Origin is null.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=origin
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will pass when the value of Timing-Allow-Origin is a case-sensitive match for the value of the origin of the current document.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=uppercase
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will fail when the value of Timing-Allow-Origin is NOT a case-sensitive match for the value of the origin of the current document.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_space-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_space-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_space-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=space
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will fail if the Timing-Allow-Origin header value list contains [origin|*]{2,}, separated by space.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=wildcard
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will pass when the Timing-Allow-Origin header value is a wildcard ("*").
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_zero-expected.txt (220730 => 220731)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_zero-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_zero-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,5 +1,5 @@
Blocked access to external URL http://www.localhost:8800/resource-timing/resources/TAOResponse.py?tao=zero
-CONSOLE MESSAGE: line 13: AbortError: The operation was aborted.
+CONSOLE MESSAGE: line 13: NetworkError: A network error occurred.
Description
This test validates that for a cross origin resource, the timing allow check algorithm will fail when the HTTP response includes zero Timing-Allow-Origin header value.
Modified: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt (220730 => 220731)
--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,7 +1,4 @@
Blocked access to external URL http://nonexistent-origin.localhost%7D:8800/
-FAIL XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) assert_throws: function "function ()
- {
- xhr.send("Test Message");
- }" threw object "AbortError: The operation was aborted." that is not a DOMException NetworkError: property "code" is equal to 20, expected 19
+PASS XMLHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set)
Modified: trunk/Source/WebCore/ChangeLog (220730 => 220731)
--- trunk/Source/WebCore/ChangeLog 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/Source/WebCore/ChangeLog 2017-08-15 01:36:04 UTC (rev 220731)
@@ -1,3 +1,26 @@
+2017-08-14 Chris Dumez <cdu...@apple.com>
+
+ XHR should only fire an abort event if the cancellation was requested by the client
+ https://bugs.webkit.org/show_bug.cgi?id=175546
+
+ Reviewed by Youenn Fablet.
+
+ XHR should only fire an abort event if the cancellation was requested by the client, otherwise it should fire an error event.
+ Blink and Gecko already match the specification.
+
+ Specification:
+ - https://xhr.spec.whatwg.org/#handle-errors
+ - https://xhr.spec.whatwg.org/#the-abort()-method
+
+ Test: http/tests/navigation/page-cache-xhr-in-pagehide.html
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::open):
+ (WebCore::XMLHttpRequest::abort):
+ (WebCore::XMLHttpRequest::abortError):
+ (WebCore::XMLHttpRequest::didFail):
+ * xml/XMLHttpRequest.h:
+
2017-08-14 Simon Fraser <simon.fra...@apple.com>
Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (220730 => 220731)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2017-08-15 01:36:04 UTC (rev 220731)
@@ -410,6 +410,7 @@
m_error = false;
m_sendFlag = false;
m_uploadComplete = false;
+ m_wasAbortedByClient = false;
// clear stuff from possible previous load
clearResponse();
@@ -778,6 +779,7 @@
// internalAbort() calls dropProtection(), which may release the last reference.
Ref<XMLHttpRequest> protectedThis(*this);
+ m_wasAbortedByClient = true;
if (!internalAbort())
return;
@@ -872,6 +874,7 @@
void XMLHttpRequest::abortError()
{
+ ASSERT(m_wasAbortedByClient);
genericError();
dispatchErrorEvents(eventNames().abortEvent);
}
@@ -1003,7 +1006,8 @@
if (m_error)
return;
- if (error.isCancellation()) {
+ // The XHR specification says we should only fire an abort event if the cancelation was requested by the client.
+ if (m_wasAbortedByClient && error.isCancellation()) {
m_exceptionCode = AbortError;
abortError();
return;
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.h (220730 => 220731)
--- trunk/Source/WebCore/xml/XMLHttpRequest.h 2017-08-15 00:53:57 UTC (rev 220730)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.h 2017-08-15 01:36:04 UTC (rev 220731)
@@ -217,6 +217,7 @@
bool m_uploadComplete { false };
bool m_sameOriginRequest { true };
+ bool m_wasAbortedByClient { false };
// Used for progress event tracking.
long long m_receivedLength { 0 };