tor-browser

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

activeelement-after-focusing-same-site-iframe.html (1175B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>activeElement when focusing same-site iframe</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <script>
      7 setup({explicit_done:true});
      8 window.onmessage = function(e) {
      9    var actual = e.data;
     10    test(function() {
     11        // Handle trailing events separately to get make it easier to see
     12        // if they are the only deviation from the expection.
     13        var endedWith = false;
     14        if (actual.endsWith(",willspineventloop,")) {
     15            endedWith = true;
     16            actual += "innerbodyfocus,innerbodyblur,";
     17        }
     18        assert_false(endedWith, "Should have gotten innerbodyfocus,innerbodyblur after willspineventloop");
     19    }, "Check trailing events");
     20    test(function() {
     21        assert_equals(actual, "outeronload,activeElement:BODY,willfocusiframe,didfocusiframe,activeElement:IFRAME,willbluriframe,didbluriframe,activeElement:BODY,willspineventloop,innerbodyfocus,innerbodyblur,", 'Check log');
     22    }, "Check result");
     23    w.close();
     24    done();
     25 };
     26 var w = window.open("support/activeelement-after-focusing-same-site-iframe-outer.html");
     27 </script>