Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / cache / preload-cleared-after-parsing-canceled-by-js.html
blob8f8c2d53f781c3e41d67e507c20592fc4c3f5f24
1 <html>
2 <head>
3 <script>
4 function saveAndCheckRandomNumber() {
5 if (!sessionStorage.lastRandom) {
6 sessionStorage.lastRandom = randomNumber;
7 } else {
8 window.passed = sessionStorage.lastRandom != randomNumber;
11 </script>
12 <script type="text/javascript" src="resources/cache-simulator.cgi?uniqueId=1&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0"></script>
13 <script type="text/javascript" src="resources/cache-simulator.cgi?uniqueId=2&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0" onload="saveAndCheckRandomNumber();"></script>
14 </head>
15 <body>
16 <script type="text/javascript">
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
21 if (document.referrer != document.location.toString()) {
22 console.log('Reloading');
23 document.location.reload();
24 } else {
25 if (window.passed === true) {
26 document.body.innerText = "PASS";
27 } else if (window.passed === false) {
28 document.body.innerText = "FAIL";
29 } else {
30 document.body.innerText = "ERROR";
32 delete sessionStorage.lastRandom;
33 if (window.testRunner) {
34 testRunner.notifyDone();
37 </script>
38 </body>
39 </html>