Changeset 167601 in webkit
- Timestamp:
- Apr 21, 2014 11:55:14 AM (10 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167597 r167601 1 2014-04-21 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/cache/subresource-failover-to-network.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=131936 5 6 Reviewed by Brady Eidson. 7 8 The test was racy, because it was unintentionally queuing TestRunner operations 9 twice. Also, it failed to clean up its cookie. 10 11 Rewrote to not use TestRunner queuing, making the test work in browser. 12 13 * http/tests/cache/resources/subresource-failover-to-network.cgi: 14 * http/tests/cache/subresource-failover-to-network.html: 15 1 16 2014-04-21 David Hyatt <hyatt@apple.com> 2 17 -
trunk/LayoutTests/http/tests/cache/resources/subresource-failover-to-network.cgi
r51798 r167601 7 7 try { 8 8 var result = document.cookie.split(';')[0].split('=')[1]; 9 document.cookie = "result=PASS"; // for next time10 9 11 10 var r = new XMLHttpRequest(); … … 16 15 document.write(e); 17 16 } 17 if (!sessionStorage.subresourceFailoverToNetworkCGILoadedBefore) { 18 sessionStorage.subresourceFailoverToNetworkCGILoadedBefore = true; 19 document.cookie = "subresourceFailoverToNetwork=PASS"; // for next time 20 history.back(); 21 } else { 22 sessionStorage.removeItem("subresourceFailoverToNetworkLoadedBefore"); 23 sessionStorage.removeItem("subresourceFailoverToNetworkCGILoadedBefore"); 24 document.cookie = "subresourceFailoverToNetwork=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"; 25 if (window.testRunner) 26 testRunner.notifyDone(); 27 } 18 28 </script> 19 29 EOF -
trunk/LayoutTests/http/tests/cache/subresource-failover-to-network.html
r120167 r167601 1 1 <body> 2 2 <script> 3 if ("testRunner" in window) { 4 testRunner.dumpAsText(); 3 function test() { 4 if (!sessionStorage.subresourceFailoverToNetworkLoadedBefore) { 5 if (window.testRunner) { 6 testRunner.dumpAsText(); 7 testRunner.waitUntilDone(); 8 } 9 sessionStorage.subresourceFailoverToNetworkLoadedBefore = true; 5 10 6 document.cookie = " result=FAIL"11 document.cookie = "subresourceFailoverToNetwork=FAIL"; 7 12 8 13 // The results of the form submission is a page that performs a non- … … 11 16 // network and not being restricted to loading from the cache (as the main 12 17 // page is). 13 testRunner.queueLoadingScript("document.forms[0].submit()"); 14 testRunner.queueBackNavigation(1); 15 testRunner.queueForwardNavigation(1); 16 } 18 setTimeout( function() { document.forms[0].submit(); }, 0); 19 } else 20 history.forward(); 21 } 22 23 onload = test; 17 24 </script> 18 25 <form method="POST" action="resources/subresource-failover-to-network.cgi" enctype="multipart/form-data"> … … 28 35 subresources (including XMLHttpRequest instances) do not inherit this cache 29 36 policy. 37 <p> 38 This test doesn't work in browser, because it expects page cache to be disabled. 30 39 </body>
Note: See TracChangeset
for help on using the changeset viewer.