Changeset 229539 in webkit
- Timestamp:
- Mar 12, 2018 10:50:53 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229534 r229539 1 2018-03-12 Chris Dumez <cdumez@apple.com> 2 3 http/tests/security/frame-loading-via-document-write-async-delegates.html fails with async delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183460 5 6 Reviewed by Alex Christensen. 7 8 The test has 3 frames which all initially load "about:blank". Then using document.write(), it inserts 9 HTML in each frame. 10 Frame 1: body has an onload event handler, which calls JS is click an anchor link to navigate the frame. 11 Frame 2: body has an onload event handler to do some logging 12 Frame 3: body has an onload event handler and finishes the test (calls testRunner.notifyDone()) 13 14 The issue is that with asynchronous policy delegates, the first frame may not have navigated yet by the 15 time the third frame is loaded. Indeed, the onload event of the first frame merely clicks am anchor link 16 which will trigger a navigation policy check and then later navigate. 17 18 To make the test more robust, we now count the number of loads and call testRunner.notifyDone() when 19 we've reached the expected number of loads. 20 21 * http/tests/security/frame-loading-via-document-write-async-delegates-expected.txt: Added. 22 * http/tests/security/frame-loading-via-document-write-async-delegates.html: Copied from LayoutTests/http/tests/security/frame-loading-via-document-write.html. 23 * http/tests/security/frame-loading-via-document-write.html: 24 * http/tests/security/resources/frame-loading-via-document-write.js: 25 1 26 2018-03-12 Per Arne Vollan <pvollan@apple.com> 2 27 -
trunk/LayoutTests/TestExpectations
r229423 r229539 188 188 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html [ DumpJSConsoleLogInStdErr ] 189 189 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html [ DumpJSConsoleLogInStdErr ] 190 191 # Line number in the console logging may change so we silence it to avoid flakiness. 192 http/tests/security/frame-loading-via-document-write.html [ DumpJSConsoleLogInStdErr ] 193 http/tests/security/frame-loading-via-document-write-async-delegates.html [ DumpJSConsoleLogInStdErr ] 190 194 191 195 webkit.org/b/181901 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html [ DumpJSConsoleLogInStdErr ] -
trunk/LayoutTests/http/tests/security/frame-loading-via-document-write-async-delegates-expected.txt
r229538 r229539 1 CONSOLE MESSAGE: line 1: Not allowed to load local resource: abe.png2 1 3 2 -
trunk/LayoutTests/http/tests/security/frame-loading-via-document-write-async-delegates.html
r229538 r229539 4 4 5 5 <script language="JavaScript"> 6 7 const expectedLoadCount = 7; 8 let loadCount = 0; 9 function finishTestIfLastLoad() 10 { 11 if (++loadCount == expectedLoadCount && window.testRunner) 12 testRunner.notifyDone(); 13 } 6 14 7 15 function buildFrameset() … … 11 19 testRunner.dumpAsText(); 12 20 testRunner.dumpChildFramesAsText(); 21 if (testRunner.setShouldDecideNavigationPolicyAfterDelay) 22 testRunner.setShouldDecideNavigationPolicyAfterDelay(true); 13 23 } 14 24 15 25 var outHTML="<frameset rows=\"33%, 33%, 33%\">"+ 16 "<frame src=\"\" name=\"topRow\">"+17 "<frame src=\"\" name=\"middleRow\">"+18 "<frame src=\"\" name=\"bottomRow\">"+26 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"topRow\">"+ 27 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"middleRow\">"+ 28 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"bottomRow\">"+ 19 29 "</frameset>"; 20 30 … … 49 59 50 60 outHTML = "<html><head><scr" + "ipt language=\"JavaScript\" src=\"resources/frame-loading-via-document-write.js\">"+ 51 "</scr" + "ipt></head><body onLoad=\" lastTest()\"><table><tr><td>"+61 "</scr" + "ipt></head><body onLoad=\"didImageLoad()\"><table><tr><td>"+ 52 62 "<div id=\"result\"></div>"+ 53 63 "<img src=\"/resources/abe.png\" id=\"myImg\">"+ -
trunk/LayoutTests/http/tests/security/frame-loading-via-document-write-expected.txt
r182266 r229539 1 CONSOLE MESSAGE: line 1: Not allowed to load local resource: abe.png2 1 3 2 -
trunk/LayoutTests/http/tests/security/frame-loading-via-document-write.html
r229496 r229539 4 4 5 5 <script language="JavaScript"> 6 7 const expectedLoadCount = 7; 8 let loadCount = 0; 9 function finishTestIfLastLoad() 10 { 11 if (++loadCount == expectedLoadCount && window.testRunner) 12 testRunner.notifyDone(); 13 } 6 14 7 15 function buildFrameset() … … 14 22 15 23 var outHTML="<frameset rows=\"33%, 33%, 33%\">"+ 16 "<frame src=\"\" name=\"topRow\">"+17 "<frame src=\"\" name=\"middleRow\">"+18 "<frame src=\"\" name=\"bottomRow\">"+24 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"topRow\">"+ 25 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"middleRow\">"+ 26 "<frame src=\"\" onload=\"finishTestIfLastLoad()\" name=\"bottomRow\">"+ 19 27 "</frameset>"; 20 28 … … 49 57 50 58 outHTML = "<html><head><scr" + "ipt language=\"JavaScript\" src=\"resources/frame-loading-via-document-write.js\">"+ 51 "</scr" + "ipt></head><body onLoad=\" lastTest()\"><table><tr><td>"+59 "</scr" + "ipt></head><body onLoad=\"didImageLoad()\"><table><tr><td>"+ 52 60 "<div id=\"result\"></div>"+ 53 61 "<img src=\"/resources/abe.png\" id=\"myImg\">"+ -
trunk/LayoutTests/http/tests/security/resources/frame-loading-via-document-write.js
r229496 r229539 18 18 } 19 19 20 function lastTest()21 {22 didImageLoad();23 24 if (window.testRunner)25 testRunner.notifyDone();26 }27
Note: See TracChangeset
for help on using the changeset viewer.