1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/indexedDB/test/third_party_iframe2.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<html> 1.9 +<head> 1.10 + <title>Indexed Database Test</title> 1.11 + 1.12 + <script type="text/javascript;version=1.7"> 1.13 + function report(result) { 1.14 + let message = { source: "iframe" }; 1.15 + message.result = result; 1.16 + window.parent.postMessage(message.toSource(), "*"); 1.17 + } 1.18 + 1.19 + function runIndexedDBTest() { 1.20 + try { 1.21 + let request = indexedDB.open(window.location.pathname, 1); 1.22 + request.onsuccess = function(event) { 1.23 + report(!!(event.target.result instanceof IDBDatabase)); 1.24 + } 1.25 + } 1.26 + catch (e) { 1.27 + report(false); 1.28 + } 1.29 + } 1.30 + </script> 1.31 + 1.32 +</head> 1.33 + 1.34 +<body onload="runIndexedDBTest();"> 1.35 +</body> 1.36 + 1.37 +</html>