tor-browser

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

test_selectevents.html (1038B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>Testing Selection Events</title>
      5    <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6    <script src="/tests/SimpleTest/EventUtils.js"></script>
      7    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      8  </head>
      9 
     10  <body>
     11    <iframe width="500"></iframe>
     12    <script>
     13      add_task(async function() {
     14        // Push the correct preferences for the test
     15        await SpecialPowers.pushPrefEnv({'set': [
     16                                          ['dom.select_events.textcontrols.enabled', true],
     17                                        ]});
     18 
     19        // Start the actual test
     20        await new Promise((done) => {
     21          var iframe = document.querySelector('iframe');
     22          iframe.addEventListener('load', done);
     23          iframe.setAttribute('src', 'frameSelectEvents.html');
     24        });
     25 
     26        // The child iframe will call add_task before we reach this point,
     27        // and will handle the rest of the test.
     28      });
     29    </script>
     30  </body>
     31 </html>