tor-browser

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

ignore-child-fenced-frame-onload-event.https.html (1116B)


      1 <!DOCTYPE html>
      2 <title>Ignore child fenced frame onload event</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/utils.js"></script>
      6 <script src="resources/utils.js"></script>
      7 
      8 <body>
      9 </body>
     10 <script>
     11  promise_test(async () => {
     12    const toplevel_loaded_key = token();
     13    const result_key = token();
     14 
     15    // Appends a fencedframe to the top-level doc.
     16    attachFencedFrame(generateURL("resources/ignore-child-fenced-frame-onload" +
     17      "-event-inner.html", ["fencedframe", toplevel_loaded_key, result_key]));
     18 
     19    // Relays the messsage to the fenced frame when the onload event is fired.
     20    window.onload = function () {
     21      writeValueToServer(toplevel_loaded_key, "yes");
     22    }
     23 
     24    assert_equals(await nextValueFromServer(result_key), "passed",
     25      "The parent frame onload event should not be blocked by any onload " +
     26      "event from subframes belonging to fenced tree, but should be blocked " +
     27      "by that of any non fenced subframe");
     28 
     29  }, "ignore child fenced frame onload event test.");
     30 </script>
     31 </html>