dom/indexedDB/test/browser_permissionsSharedWorker.html
author Andrea Marchesini <amarchesini@mozilla.com>
Wed, 06 May 2015 09:07:57 +0100
changeset 267477 498a842f6d9e5518705ae72a437371be8834d38c
parent 267402 f0b8c5191337b3a18f9963dc93a706d1aac1017d
child 393926 a072d7934ff7c6fd2ad974d7abc0b08d11041aca
permissions -rw-r--r--
Bug 1151495 - Support permission prompting from workers for IDB. r=bent, a=lizzard

<!--
  Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
  <head>
    <title>Indexed Database Test</title>

    <script type="text/javascript;version=1.7">
    let testIsIDBDatabase;
    let testException;

    function runTest() {
      let w = new SharedWorker('browser_permissionsSharedWorker.js');
      w.port.onmessage = function(e) {
        if (e.data.status == 'success') {
          testIsIDBDatabase = e.data.isIDBDatabase;
        } else {
          testException = e.data.error;
        }

        setTimeout(testFinishedCallback, 0, testIsIDBDatabase, testException);
      }

      const name = window.location.pathname + "_sharedWorker";
      w.port.postMessage(name);
    }
    </script>

  </head>

  <body onload="runTest();"></body>

</html>