Title: [228187] trunk/LayoutTests
Revision
228187
Author
[email protected]
Date
2018-02-06 13:00:52 -0800 (Tue, 06 Feb 2018)

Log Message

Make mixed content basic auth tests more robust
https://bugs.webkit.org/show_bug.cgi?id=182537

Reviewed by Chris Dumez.

Load the test image programmatically instead of declaratively to avoid output flakiness caused by
the preload scanner preloading the test image. The preload scanner performs mixed content checks
and this can cause duplicate mixed content warnings in the test output.

* http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html:
* http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (228186 => 228187)


--- trunk/LayoutTests/ChangeLog	2018-02-06 20:55:08 UTC (rev 228186)
+++ trunk/LayoutTests/ChangeLog	2018-02-06 21:00:52 UTC (rev 228187)
@@ -1,3 +1,17 @@
+2018-02-06  Daniel Bates  <[email protected]>
+
+        Make mixed content basic auth tests more robust
+        https://bugs.webkit.org/show_bug.cgi?id=182537
+
+        Reviewed by Chris Dumez.
+
+        Load the test image programmatically instead of declaratively to avoid output flakiness caused by
+        the preload scanner preloading the test image. The preload scanner performs mixed content checks
+        and this can cause duplicate mixed content warnings in the test output.
+
+        * http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html:
+        * http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html:
+
 2018-02-06  Antoine Quint  <[email protected]>
 
         [Modern Media Controls] Test at media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html fails

Modified: trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html (228186 => 228187)


--- trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html	2018-02-06 20:55:08 UTC (rev 228186)
+++ trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image.https.html	2018-02-06 21:00:52 UTC (rev 228187)
@@ -22,10 +22,22 @@
     testFailed("did load image.");
     finishJSTest();
 }
+
+function runTest()
+{
+    // Load the image programmatically instead of declaratively to avoid output flakiness caused by
+    // the preload scanner performing mixed content checks as part of preloading the image.
+    let image = new Image;
+    image._onload_ = fail;
+    image._onerror_ = pass;
+    image.src = ""
+    document.body.appendChild(image);
+}
+
+window._onload_ = runTest;
 </script>
 <script>
 description("This test loads a secure image that redirects to an insecure image that redirects to a secure image guarded by basic authentication. The secure image should be blocked because it requires credentials and was loaded via an insecure redirect.");
 </script>
-<img src="" _onerror_="pass()" _onload_="fail()">
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html (228186 => 228187)


--- trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html	2018-02-06 20:55:08 UTC (rev 228186)
+++ trunk/LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image.https.html	2018-02-06 21:00:52 UTC (rev 228187)
@@ -22,10 +22,22 @@
     testFailed("did not load image.");
     finishJSTest();
 }
+
+function runTest()
+{
+    // Load the image programmatically instead of declaratively to avoid output flakiness caused by
+    // the preload scanner performing mixed content checks as part of preloading the image.
+    let image = new Image;
+    image._onload_ = pass;
+    image._onerror_ = fail;
+    image.src = ""
+    document.body.appendChild(image);
+}
+
+window._onload_ = runTest;
 </script>
 <script>
 description("This test loads a secure image that redirects to a secure image that redirects to a secure image guarded by basic authentication. The secure image should load.");
 </script>
-<img src="" _onerror_="fail()" _onload_="pass()">
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to