Title: [209401] trunk/LayoutTests
- Revision
- 209401
- Author
- [email protected]
- Date
- 2016-12-06 09:45:54 -0800 (Tue, 06 Dec 2016)
Log Message
Test insecure-xhr-sync-in-main-frame.html fails with CORS error if run before r203542
https://bugs.webkit.org/show_bug.cgi?id=165407
Reviewed by Alexey Proskuryakov.
Make the test insecure-xhr-sync-in-main-frame.html demonstrate a mixed content failure
instead of a CORS failure when run before r203542.
In r203542 the test http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame.html
was added to ensure that we block loading insecure data via XHR from an HTTPS page. When
this test is run prior to r203542 it fails due to a CORS errors as opposed to showing
the intended _javascript_ alert failure message. The CORS error is due to loading a
cross-origin resource that did not return an appropriate Access-Control-Allow-Origin header
to allow reading of the response.
* http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt: Update expected result
based on the change below.
* http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html:
Load a resource that returns "Access-Control-Allow-Origin: *" so that origin (http, 127.0.0.1, 8000)
can read the response returned from origin (https, 127.0.0.1, 8443).
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209400 => 209401)
--- trunk/LayoutTests/ChangeLog 2016-12-06 17:42:37 UTC (rev 209400)
+++ trunk/LayoutTests/ChangeLog 2016-12-06 17:45:54 UTC (rev 209401)
@@ -1,3 +1,26 @@
+2016-12-06 Daniel Bates <[email protected]>
+
+ Test insecure-xhr-sync-in-main-frame.html fails with CORS error if run before r203542
+ https://bugs.webkit.org/show_bug.cgi?id=165407
+
+ Reviewed by Alexey Proskuryakov.
+
+ Make the test insecure-xhr-sync-in-main-frame.html demonstrate a mixed content failure
+ instead of a CORS failure when run before r203542.
+
+ In r203542 the test http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame.html
+ was added to ensure that we block loading insecure data via XHR from an HTTPS page. When
+ this test is run prior to r203542 it fails due to a CORS errors as opposed to showing
+ the intended _javascript_ alert failure message. The CORS error is due to loading a
+ cross-origin resource that did not return an appropriate Access-Control-Allow-Origin header
+ to allow reading of the response.
+
+ * http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt: Update expected result
+ based on the change below.
+ * http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html:
+ Load a resource that returns "Access-Control-Allow-Origin: *" so that origin (http, 127.0.0.1, 8000)
+ can read the response returned from origin (https, 127.0.0.1, 8443).
+
2016-12-06 Tim Horton <[email protected]>
PDF markup/annotations visible in Mail on macOS but not on iOS
Modified: trunk/LayoutTests/http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt (209400 => 209401)
--- trunk/LayoutTests/http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt 2016-12-06 17:42:37 UTC (rev 209400)
+++ trunk/LayoutTests/http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt 2016-12-06 17:45:54 UTC (rev 209401)
@@ -1,3 +1,3 @@
-CONSOLE MESSAGE: line 26: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html was not allowed to run insecure content from http://127.0.0.1:8000/.
+CONSOLE MESSAGE: line 26: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html was not allowed to run insecure content from http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi.
This test opens a HTTPS window that loads insecure data via synchronous XHR. We should trigger a mixed content callback because the main frame in the window is HTTPS but now has insecure data.
Modified: trunk/LayoutTests/http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html (209400 => 209401)
--- trunk/LayoutTests/http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html 2016-12-06 17:42:37 UTC (rev 209400)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html 2016-12-06 17:45:54 UTC (rev 209401)
@@ -16,7 +16,7 @@
}, 2000);
try {
- xhr.open("GET", "http://127.0.0.1:8000/", false);
+ xhr.open("GET", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi", false);
} catch (ex) {
// Firefox raises an exception, which is one way to make this detectable.
if (window.testRunner)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes