no-http-cache-interference.https.html (1012B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/common/dispatcher/dispatcher.js"></script> 5 <script src="/common/utils.js"></script> 6 <script src="../resources/utils.js"></script> 7 <script src="resources/utils.sub.js"></script> 8 <!-- Regression test for https://issues.chromium.org/issues/381099745 --> 9 10 <script> 11 setup(() => assertSpeculationRulesIsSupported()); 12 13 promise_test(async t => { 14 let agent = await spawnWindow(t); 15 let nextUrl = agent.getExecutorURL({ executor: "conditional-status.py" }); 16 await agent.forceSinglePrefetch(nextUrl); 17 await agent.navigate(nextUrl); 18 19 const result = await agent.execute_script(() => { 20 return document.body.textContent; 21 }); 22 23 assert_equals(result, "200", "Should use the non-prefetched 200, instead of the prefetched 503"); 24 }, "Check that the HTTP cache doesn't cache when the server conditionally responds with 503 for prefetch requests."); 25 </script>