tor-browser

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

click_iframe_crossorigin.sub.html (881B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>TestDriver click on a document in an iframe</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 
      9 <script>
     10 setup({single_test: true});
     11 addEventListener("message", (msg) => {
     12    if (msg.data === "PASS") {
     13        done();
     14    } else if (msg.data === "FAIL") {
     15        assert_unreached("click failed");
     16    } else {
     17        assert_unreached("testdriver.js-internal messages should not be exposed to tests");
     18    }
     19 });
     20 </script>
     21 
     22 <!-- Make sure we add the event listener before loading the iframe, to avoid
     23 potentially missing messages from the child. -->
     24 <iframe src="https://{{host}}:{{ports[https][1]}}/infrastructure/testdriver/click_child_testdriver.html"></iframe>