Changeset 229579 in webkit
- Timestamp:
- Mar 13, 2018 11:07:30 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229578 r229579 1 2018-03-13 Chris Dumez <cdumez@apple.com> 2 3 fast/loader/javascript-url-iframe-remove-on-navigate.html is flaky with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183588 5 6 Reviewed by Alex Christensen. 7 8 The test was setting the frame's src to a javascript URL in a setTimeout(0), expecting the 9 navigation policy delegate to have already completed. However, with asynchronous policy 10 delegates, this is not necessarily the case. Therefore, we now wait for the beforeunload 11 event to be fired at the window, since this indicates a policy decision has been made and 12 we are actually navigating. 13 14 I checked that this test was printing the "FAIL" alert in both Firefox and Chrome before 15 this change. 16 17 * fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate-expected.txt: Added. 18 * fast/loader/javascript-url-iframe-remove-on-navigate-async-delegate.html: Added. 19 * fast/loader/javascript-url-iframe-remove-on-navigate.html: 20 1 21 2018-03-13 Ross Kirsling <ross.kirsling@sony.com> 2 22 -
trunk/LayoutTests/fast/loader/javascript-url-iframe-remove-on-navigate.html
r190505 r229579 6 6 } 7 7 8 setTimeout(function() { 9 document.getElementById("target").src = "javascript:alert('FAIL')"; 8 let frame = document.getElementById("target"); 9 frame.contentWindow.onbeforeunload = function() { 10 setTimeout(function() { 11 frame.src = "javascript:alert('FAIL')"; 10 12 }, 0); 13 }; 11 14 12 15 window.addEventListener("load", function() { 13 14 15 16 16 document.write("PASS - Javascript URL blocked without crashing."); 17 if (window.testRunner) 18 testRunner.notifyDone(); 19 }, false); 17 20 </script>
Note: See TracChangeset
for help on using the changeset viewer.