dom/indexedDB/test/third_party_iframe2.html

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <!--
michael@0 2 Any copyright is dedicated to the Public Domain.
michael@0 3 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 4 -->
michael@0 5 <html>
michael@0 6 <head>
michael@0 7 <title>Indexed Database Test</title>
michael@0 8
michael@0 9 <script type="text/javascript;version=1.7">
michael@0 10 function report(result) {
michael@0 11 let message = { source: "iframe" };
michael@0 12 message.result = result;
michael@0 13 window.parent.postMessage(message.toSource(), "*");
michael@0 14 }
michael@0 15
michael@0 16 function runIndexedDBTest() {
michael@0 17 try {
michael@0 18 let request = indexedDB.open(window.location.pathname, 1);
michael@0 19 request.onsuccess = function(event) {
michael@0 20 report(!!(event.target.result instanceof IDBDatabase));
michael@0 21 }
michael@0 22 }
michael@0 23 catch (e) {
michael@0 24 report(false);
michael@0 25 }
michael@0 26 }
michael@0 27 </script>
michael@0 28
michael@0 29 </head>
michael@0 30
michael@0 31 <body onload="runIndexedDBTest();">
michael@0 32 </body>
michael@0 33
michael@0 34 </html>

mercurial