activation-initial-about-blank.html (1074B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="i"></iframe> 5 <script> 6 promise_test(async t => { 7 // Wait for after the load event so that the navigation doesn't get converted 8 // into a replace navigation. 9 await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); 10 11 assert_equals(i.contentWindow.navigation.activation, null); 12 13 i.contentWindow.navigation.navigate("/common/blank.html?a"); 14 await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0)); 15 16 assert_equals(i.contentWindow.navigation.entries().length, 1); 17 assert_equals(i.contentWindow.navigation.activation.entry, 18 i.contentWindow.navigation.currentEntry); 19 assert_equals(i.contentWindow.navigation.activation.from.url, "about:blank"); 20 assert_equals(i.contentWindow.navigation.activation.from.index, -1); 21 assert_equals(i.contentWindow.navigation.activation.navigationType, "replace"); 22 }, "navigation.activation interaction with initial about:blank"); 23 </script>