test_bfcache.html (1127B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <html> 6 <head> 7 <title>Indexed Database Property Test</title> 8 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 <script type="text/javascript"> 12 function* testSteps() 13 { 14 window.onmessage = grabEventAndContinueHandler; 15 16 let testWin = window.open("bfcache_page1.html", "testWin"); 17 var event = yield undefined; 18 is(event.data, "go", "set up database successfully"); 19 20 testWin.location = "bfcache_page2.html"; 21 let res = JSON.parse((yield).data); 22 is(res.version, 2, "version was set correctly"); 23 is(res.storeCount, 1, "correct set of stores"); 24 ok(!("blockedFired" in res), "blocked shouldn't fire"); 25 is(res.value, JSON.stringify({ hello: "world" }), 26 "correct value found in store"); 27 28 testWin.close(); 29 finishTest(); 30 } 31 </script> 32 <script type="text/javascript" src="helpers.js"></script> 33 34 </head> 35 36 <body onload="runTest();"> 37 </body> 38 39 </html>