Changeset 252139 in webkit
- Timestamp:
- Nov 6, 2019 9:36:33 AM (4 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252138 r252139 1 2019-11-06 Daniel Bates <dabates@apple.com> 2 3 http/tests/security/isolatedWorld/bypass-main-world-csp-worker.html is a Flakey Failure 4 https://bugs.webkit.org/show_bug.cgi?id=198924 5 <rdar://problem/51811010> 6 7 Reviewed by Brent Fulgham. 8 9 JavaScript alert() cannot be called from a Web Worker. Use postMessage() instead to post "PASS" 10 to the worker's owner document. The tests don't actually make use of this posted message, but 11 fixing the code to use postMessage() may come in handy for future tests. 12 13 * http/tests/security/contentSecurityPolicy/resources/worker.php: 14 * http/tests/security/contentSecurityPolicy/worker-script-src.html: 15 * http/tests/security/isolatedWorld/bypass-main-world-csp-worker.html: 16 1 17 2019-11-06 Daniel Bates <dabates@apple.com> 2 18 -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/worker.php
r199221 r252139 81 81 82 82 <?php 83 } else if ($_GET["type"] == " alert-pass") {83 } else if ($_GET["type"] == "post-message-pass") { 84 84 ?> 85 85 86 alert('PASS');86 postMessage("PASS"); 87 87 88 88 <?php -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/worker-script-src.html
r195367 r252139 12 12 <script> 13 13 try { 14 var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=alert-pass&csp=' + 14 // We ignore the message posted by the worker (by not registering an onmessage handler) as we are only interested in knowing whether an exception occurred. 15 var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=post-message-pass&csp=' + 15 16 encodeURIComponent("script-src 'self' 'unsafe-inline'")); 16 17 alert("PASS"); -
trunk/LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp-worker.html
r196526 r252139 25 25 var worker; 26 26 try { 27 worker = new Worker("http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=alert-pass"); 27 // We ignore the message posted by the worker (by not registering an onmessage handler) as we are only interested in knowing whether an exception occurred. 28 worker = new Worker("http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=post-message-pass"); 28 29 window.postMessage("PASS worker instantiated.", "*"); 29 30 } catch (exception) {
Note: See TracChangeset
for help on using the changeset viewer.