tor-browser

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

resource-selection-pointer-remove-text.html (837B)


      1 <!doctype html>
      2 <title>pointer updates (removing text nodes)</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id=log></div>
      6 <script>
      7 var a = 0;
      8 var b = 0;
      9 var c = 0;
     10 </script>
     11 <video
     12 >x<source onerror=a++
     13 >x<source onerror=b++ src='resources/delayed-broken-video.py'
     14 >x<source onerror=c++
     15 >x</video
     16 >
     17 <script>
     18 async_test(function(t) {
     19  var video = document.querySelector('video');
     20  // remove the text nodes
     21  [].forEach.call(video.childNodes, function(node) {
     22    if (node.nodeType == node.TEXT_NODE) {
     23      video.removeChild(node);
     24    }
     25  });
     26  window.onload = t.step_func(function() {
     27    assert_equals(a, 1, 'error events on a');
     28    assert_equals(b, 1, 'error events on b');
     29    assert_equals(c, 1, 'error events on c');
     30    t.done();
     31  });
     32 });
     33 </script>