tor-browser

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

empty-with-base.html (950B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Script src with an empty URL</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <base href=unreachable.js>
      7 <div id=log></div>
      8 <script>
      9 async_test(function(t) {
     10  window.unreachable = this.unreached_func("Should not load unreachable.js");
     11  var queued = false;
     12  var script = document.createElement("script");
     13  script.onerror = this.step_func_done(function(ev) {
     14    assert_equals(ev.type, "error");
     15    assert_false(ev.bubbles, "bubbles");
     16    assert_false(ev.cancelable, "cancelable");
     17    assert_true(ev.isTrusted, "isTrusted");
     18    assert_equals(ev.target, script);
     19    assert_true(ev instanceof Event, "instanceof Event");
     20    assert_class_string(ev, "Event");
     21    assert_true(queued, "event should not be dispatched synchronously");
     22  });
     23  script.setAttribute("src", "");
     24  document.body.appendChild(script);
     25  queued = true;
     26 });
     27 </script>