third_party_iframe2.html 753 B

1234567891011121314151617181920212223242526272829303132333435
  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 Test</title>
  8. <script type="text/javascript;version=1.7">
  9. function report(result) {
  10. let message = { source: "iframe" };
  11. message.result = result;
  12. window.parent.postMessage(message.toSource(), "*");
  13. }
  14. function runIndexedDBTest() {
  15. try {
  16. let request = indexedDB.open(window.location.pathname, 1);
  17. request.onsuccess = function(event) {
  18. report(!!(event.target.result instanceof IDBDatabase));
  19. }
  20. }
  21. catch (e) {
  22. report(false);
  23. }
  24. }
  25. </script>
  26. </head>
  27. <body onload="runIndexedDBTest();">
  28. </body>
  29. </html>