Changeset 229577 in webkit
- Timestamp:
- Mar 13, 2018 9:12:40 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229576 r229577 1 2018-03-13 Danyao Wang <danyao@chromium.org> 2 3 LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html fails with async policy delegate 4 https://bugs.webkit.org/show_bug.cgi?id=183386 5 6 Reviewed by Chris Dumez. 7 8 This test relies on the happenstance that with sync poicy decision, the subframe transitions 9 to FrameLoadProvisional before main frame navigation is committed. With async delegate, 10 policy checks for the main frame and subframe are interleaved. When the main frame policy 11 decision is received, it cancels the subframe check. So the page ends up being cached when 12 navigating away. This is working as intended. 13 14 * http/tests/navigation/page-cache-iframe-provisional-load-async-delegates-expected.txt: Added. 15 * http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html: Copied from LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html. 16 Add a new version of the test that forces async policy delegate. 17 18 * http/tests/navigation/page-cache-iframe-provisional-load.html: 19 Update test to sequence main frame navigation after start of provisional navigation in subframe. 20 1 21 2018-03-13 Frederic Wang <fwang@igalia.com> 2 22 -
trunk/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html
r229576 r229577 7 7 window.jsTestIsAsync = true; 8 8 9 if (window.testRunner) 9 if (window.testRunner) { 10 if (testRunner.setShouldDecideNavigationPolicyAfterDelay) 11 testRunner.setShouldDecideNavigationPolicyAfterDelay(true); 12 10 13 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 14 } 11 15 12 16 window.addEventListener("pageshow", function(event) { … … 32 36 function loadSubframeAndNavigateAway() 33 37 { 34 // Force a back navigation back to this page.35 38 window.sessionStorage.page_cache_provisional_load_test_started = true; 36 window.location.href = "resources/page-cache-helper.html";37 39 40 // Force a back navigation back to this page after the subframe starts provisional navigation. 38 41 var testFrame = document.getElementById("testFrame"); 42 testFrame.onbeforeunload = function() { 43 setTimeout(function() { 44 window.location.href = "resources/page-cache-helper.html"; 45 }, 0); 46 }; 39 47 testFrame.src = "http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=3000"; 40 48 } 41 49 42 window.addEventListener('load', function() { 43 setTimeout(function() { 44 loadSubframeAndNavigateAway(); 45 }, 0); 46 }, false); 50 window.addEventListener('load', loadSubframeAndNavigateAway, false); 47 51 48 52 </script> -
trunk/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html
r188592 r229577 32 32 function loadSubframeAndNavigateAway() 33 33 { 34 // Force a back navigation back to this page.35 34 window.sessionStorage.page_cache_provisional_load_test_started = true; 36 window.location.href = "resources/page-cache-helper.html";37 35 36 // Force a back navigation back to this page after the subframe starts provisional navigation. 38 37 var testFrame = document.getElementById("testFrame"); 38 testFrame.onbeforeunload = function() { 39 setTimeout(function() { 40 window.location.href = "resources/page-cache-helper.html"; 41 }, 0); 42 }; 39 43 testFrame.src = "http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=3000"; 40 44 } 41 45 42 window.addEventListener('load', function() { 43 setTimeout(function() { 44 loadSubframeAndNavigateAway(); 45 }, 0); 46 }, false); 46 window.addEventListener('load', loadSubframeAndNavigateAway, false); 47 47 48 48 </script>
Note: See TracChangeset
for help on using the changeset viewer.