browser_permissionsPrompt.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <html>
  6. <head>
  7. <meta charset=UTF-8>
  8. <title>Indexed Database Test</title>
  9. <script type="text/javascript;version=1.7">
  10. function testSteps()
  11. {
  12. const name = window.location.pathname;
  13. let request = indexedDB.open(name, { version: 1,
  14. storage: "persistent" });
  15. request.onerror = grabEventAndContinueHandler;
  16. request.onsuccess = grabEventAndContinueHandler;
  17. let event = yield undefined;
  18. if (event.type == "success") {
  19. testResult = event.target.result instanceof IDBDatabase;
  20. }
  21. else {
  22. testException = event.target.error.name;
  23. }
  24. event.preventDefault();
  25. finishTest()
  26. yield undefined;
  27. }
  28. </script>
  29. <script type="text/javascript;version=1.7" src="browserHelpers.js"></script>
  30. </head>
  31. <body onload="runTest();" onunload="finishTestNow();"></body>
  32. </html>