tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_xmlDocument.html (850B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Test for Document constructor</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7 </head>
      8 <body>
      9 <script type="application/javascript">
     10 
     11 let w;
     12 
     13 SpecialPowers.pushPrefEnv({set: [
     14  ["dom.storage_access.enabled", true],
     15  ["dom.storage_access.prompt.testing", true],
     16  ["dom.storage_access.prompt.testing.allow", true],
     17  ["network.cookie.cookieBehavior", 0],
     18 ]}).then(_ => {
     19  return new Promise(resolve => {
     20    w = window.open("empty.html");
     21    w.onload = resolve;
     22  });
     23 }).then(_ => {
     24  const doc = new w.Document();
     25  return doc.requestStorageAccess().catch(__ => {});
     26 }).then(___ => {
     27  w.close();
     28  ok(true, "No crash!");
     29  SimpleTest.finish();
     30 });
     31 
     32 SimpleTest.waitForExplicitFinish();
     33 
     34 </script>
     35 </body>
     36 </html>