before-unload.https.html (732B)
1 <!DOCTYPE html> 2 <title>Test the before unload event</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/common/utils.js"></script> 6 <script src="resources/utils.js"></script> 7 8 <body> 9 10 <script> 11 promise_test(async () => { 12 const before_unload_key = token(); 13 14 const frame_url = generateURL("resources/before-unload-inner.html", 15 [before_unload_key]); 16 17 attachFencedFrame(frame_url); 18 19 const result = await nextValueFromServer(before_unload_key); 20 assert_equals(result, "Loaded the next url in a fenced frame", 21 "A fenced frame should not fire the before unload event."); 22 }, "before unload event in fenced frames"); 23 </script> 24 25 </body>