1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/indexedDB/test/bfcache_iframe1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <script> 1.8 + var request = indexedDB.open(parent.location, 1); 1.9 + request.onupgradeneeded = function(e) { 1.10 + var db = e.target.result; 1.11 + // This should never be called 1.12 + db.onversionchange = function(e) { 1.13 + db.transaction(["mystore"]).objectStore("mystore").put({ hello: "fail" }, 42); 1.14 + } 1.15 + var trans = e.target.transaction; 1.16 + if (db.objectStoreNames.contains("mystore")) { 1.17 + db.deleteObjectStore("mystore"); 1.18 + } 1.19 + var store = db.createObjectStore("mystore"); 1.20 + store.add({ hello: "world" }, 42); 1.21 + trans.oncomplete = function() { 1.22 + parent.postMessage("go", "http://mochi.test:8888"); 1.23 + } 1.24 + }; 1.25 + </script> 1.26 +</head> 1.27 +<body> 1.28 + This is page one. 1.29 +</body> 1.30 +</html>