second-interaction-not-softnav.tentative.html (957B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testdriver.js"></script> 8 <script src="/resources/testdriver-vendor.js"></script> 9 <script src="resources/soft-navigation-helper.js"></script> 10 </head> 11 <body> 12 <main id=main> 13 <p><a id=link>Click me!</a></p> 14 <p><a id=secondlink>Then click me!</a></p> 15 </main> 16 <script> 17 testSoftNavigation({ 18 testName: "Second interaction in the middle of a soft navigation", 19 addContent: async () => { 20 if (test_driver) { 21 const secondlink = document.getElementById("secondlink"); 22 const clickPromise = new Promise(r => { 23 secondlink.addEventListener("click", r); 24 }); 25 test_driver.click(secondlink); 26 await clickPromise; 27 } 28 return addImageToMain(); 29 }, 30 }); 31 </script> 32 </body> 33 </html>