Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / cache / subresource-failover-to-network.html
blobf5cea379278003b5e3cf67595eca62ddc38b7008
1 <body>
2 <script>
3 if ("testRunner" in window) {
4 testRunner.dumpAsText();
6 document.cookie = "result=FAIL"
8 // The results of the form submission is a page that performs a non-
9 // cacheable sync XHR request. Upon returning to that page, we expect the
10 // sync XHR request to still succeed. This relies on it loading from the
11 // network and not being restricted to loading from the cache (as the main
12 // page is).
13 testRunner.queueLoadingScript("document.forms[0].submit()");
14 testRunner.queueBackNavigation(1);
15 testRunner.queueForwardNavigation(1);
17 </script>
18 <form method="POST" action="resources/subresource-failover-to-network.cgi" enctype="multipart/form-data">
19 <input type="submit">
20 </form>
21 <p>
22 This test verifies that a synchronous XMLHttpRequest, generated from a page
23 that is the result of a form submission, loads properly when the user navigates
24 back to the page.
25 <p>
26 When navigating back to a page that resulted from a form submission, the page
27 is loaded with the ReturnCacheDataDontLoad cache policy. It is important that
28 subresources (including XMLHttpRequest instances) do not inherit this cache
29 policy.
30 </body>