replacestate-null-then-push.tentative.html (824B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Detect soft navigation with replaceState that has a null URL, then 6 pushState with the URL.</title> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="/resources/testdriver.js"></script> 10 <script src="/resources/testdriver-vendor.js"></script> 11 <script src="resources/soft-navigation-helper.js"></script> 12 </head> 13 <body> 14 <main id=main> 15 <a id=link>Click me!</a> 16 </main> 17 <script> 18 testSoftNavigation({ 19 testName: "Detect soft navigation with replaceState that has a null URL," + 20 " then pushState with the URL", 21 pushState: async (url) =>{ 22 history.replaceState({}, ''); 23 history.pushState({}, '', url); 24 }, 25 }); 26 </script> 27 </body> 28 </html>