tor-browser

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

embed-in-object-fallback.html (1363B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Ensure that embed elements inside object elements load when the objects
      4  fall back but not otherwise</title>
      5 <script src=/resources/testharness.js></script>
      6 <script src=/resources/testharnessreport.js></script>
      7 <script>
      8  var child1Loaded = false;
      9  var child2Loaded = false;
     10  var child3Loaded = false;
     11  var parent3Loaded = false;
     12 </script>
     13 <object>
     14  <embed src="embed-in-object-fallback-subdocument.html?child1Loaded">
     15 </object>
     16 <object>
     17  <embed id="two" src="embed-in-object-fallback-subdocument.html?child2Loaded">
     18  <!-- Something that forces the embed to be in the tree before the <object>
     19       is done parsing -->
     20  <script>
     21    test(function() {
     22      assert_equals(document.getElementById("two").localName,
     23                    "embed");
     24    }, "We have the right embed element");
     25  </script>
     26 </object>
     27 <object data="embed-in-object-fallback-subdocument.html?parent3Loaded">
     28  <embed src="embed-in-object-fallback-subdocument.html?child3Loaded">
     29 </object>
     30 <script>
     31  var t = async_test("Check that the right things loaded");
     32  onload = t.step_func_done(function() {
     33    assert_true(child1Loaded, "child 1 should load");
     34    assert_true(child2Loaded, "child 2 should load");
     35    assert_false(child3Loaded, "child 3 should not load");
     36    assert_true(parent3Loaded, "parent 3 should load");
     37  });
     38 </script>