| <!DOCTYPE html> | |
| <meta name="timeout" content="long"> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> | |
| <script src="/common/dispatcher/dispatcher.js"></script> | |
| <script src="/common/utils.js"></script> | |
| <script src="../resources/utils.js"></script> | |
| <script src="resources/utils.sub.js"></script> | |
| <script> | |
| setup(() => assertSpeculationRulesIsSupported()); | |
| promise_test(async t => { | |
| let agent = await spawnWindow(t); | |
| let nextUrl = agent.getExecutorURL({ executor: 'post-navigation-handler.py', protocol: 'https', page: 2 }); | |
| await agent.forceSinglePrefetch(nextUrl); | |
| await agent.execute_script(async (nextUrl) => { | |
| window.executor.suspend(() => { | |
| navigate_by_form_generated_post(nextUrl); | |
| }); | |
| }, [nextUrl]); | |
| assert_not_prefetched(await agent.getRequestHeaders()); | |
| }, "post navigations should not use cached prefetch"); | |
| </script> |