session-history-activation.https.html (834B)
1 <!DOCTYPE html> 2 <title>Test history.length</title> 3 <meta name="timeout" content="long"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/common/utils.js"></script> 7 <script src="../resources/utils.js"></script> 8 <script src="resources/utils.js"></script> 9 <script src="resources/session-history-test-util.js"></script> 10 11 <body> 12 <script> 13 setup(() => assertSpeculationRulesIsSupported()); 14 15 const uid = token(); 16 17 promise_test(async () => { 18 assert_equals( 19 await runTestInPrerender("testHistoryLengthInPrerender", uid), 20 "Passed", 21 "test in prerender" 22 ); 23 assert_equals( 24 await runTestInActivatedPage("testHistoryLengthInPrerender", uid), 25 "Passed", 26 "test in activated page" 27 ); 28 }, "history.length should be updated after activation"); 29 </script>