Title: [230691] trunk/LayoutTests
Revision
230691
Author
krol...@apple.com
Date
2018-04-16 16:57:08 -0700 (Mon, 16 Apr 2018)

Log Message

REGRESSION: [mac-wk2 release] LayoutTest http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=184673
<rdar://problem/39474698>

Unreviewed test gardening. The test was flaky because the HTTP parser
would try to preload the _javascript_ resource. Sometimes this operation
would complete in time to print its own console message, duplicating a
subsequent one when the non-preloading resource-load occurs. Updated
the test to load the _javascript_ in such a way that it skips the reload
step.

* TestExpectations:
* http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (230690 => 230691)


--- trunk/LayoutTests/ChangeLog	2018-04-16 23:46:54 UTC (rev 230690)
+++ trunk/LayoutTests/ChangeLog	2018-04-16 23:57:08 UTC (rev 230691)
@@ -1,3 +1,20 @@
+2018-04-16  Keith Rollin  <krol...@apple.com>
+
+        REGRESSION: [mac-wk2 release] LayoutTest http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=184673
+        <rdar://problem/39474698>
+
+        Unreviewed test gardening. The test was flaky because the HTTP parser
+        would try to preload the _javascript_ resource. Sometimes this operation
+        would complete in time to print its own console message, duplicating a
+        subsequent one when the non-preloading resource-load occurs. Updated
+        the test to load the _javascript_ in such a way that it skips the reload
+        step.
+
+        * TestExpectations:
+        * http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt:
+        * http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
+
 2018-04-16  Ross Kirsling  <ross.kirsl...@sony.com>
 
         Unreviewed. Update WinCairo TestExpectations in preparation for LayoutTests automation.

Modified: trunk/LayoutTests/TestExpectations (230690 => 230691)


--- trunk/LayoutTests/TestExpectations	2018-04-16 23:46:54 UTC (rev 230690)
+++ trunk/LayoutTests/TestExpectations	2018-04-16 23:57:08 UTC (rev 230691)
@@ -1196,7 +1196,6 @@
 webkit.org/b/154203 http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-xfo.html
 webkit.org/b/154522 http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-base-uri-deny.html
 webkit.org/b/155132 http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html [ Failure ]
-http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html [ Pass Failure ]
 webkit.org/b/158480 http/tests/websocket/tests/hybi/upgrade-simple-ws.html [ Skip ]
 
 # These state object tests purposefully stress a resource limit, and take multiple seconds to run.

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt (230690 => 230691)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt	2018-04-16 23:46:54 UTC (rev 230690)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt	2018-04-16 23:57:08 UTC (rev 230691)
@@ -1,5 +1,4 @@
-CONSOLE MESSAGE: Refused to load the script 'http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".
+CONSOLE MESSAGE: Refused to load http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js because it does not appear in the script-src directive of the Content Security Policy.
 
-
 PASS Script element has error on bad script-src 
 

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html (230690 => 230691)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html	2018-04-16 23:46:54 UTC (rev 230690)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html	2018-04-16 23:57:08 UTC (rev 230691)
@@ -18,6 +18,12 @@
     </script>
 </head>
     <body>
-    <script _onload_="scriptLoad();" _onerror_="scriptError();" src=""
+    <script>
+        let script = document.createElement("script");
+        script.src = ""
+        script._onerror_ = scriptError;
+        script._onload_ = scriptLoad;
+        document.body.appendChild(script);
+    </script>
     </body>
 </html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to