fetch-event-is-reload-iframe-navigation-manual.https.html (1098B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/common/get-host-info.sub.js"></script> 5 <script src="resources/test-helpers.sub.js"></script> 6 <body> 7 <script> 8 const worker = 'resources/fetch-event-test-worker.js'; 9 10 promise_test(async (t) => { 11 const scope = 'resources/simple.html?isReloadNavigation'; 12 13 const reg = await service_worker_unregister_and_register(t, worker, scope); 14 await wait_for_state(t, reg.installing, 'activated'); 15 const frame = await with_iframe(scope); 16 assert_equals(frame.contentDocument.body.textContent, 17 'method = GET, isReloadNavigation = false'); 18 await new Promise((resolve) => { 19 frame.addEventListener('load', resolve); 20 frame.contentDocument.body.innerText = 21 'Reload this frame manually!'; 22 }); 23 assert_equals(frame.contentDocument.body.textContent, 24 'method = GET, isReloadNavigation = true'); 25 frame.remove(); 26 await reg.unregister(); 27 }, 'FetchEvent#request.isReloadNavigation is true for manual reload.'); 28 29 </script> 30 </body> 31 </html>