tor-browser

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

historical.html (1919B)


      1 <!doctype html>
      2 <title>Historical script element features should not be supported</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script>
      6 function t(property) {
      7  test(function() {
      8    assert_false(property in document.createElement('script'));
      9  }, 'script.' + property + ' should not be supported');
     10 }
     11 // added in https://github.com/whatwg/html/commit/69f83cf2eacf4543860ccb7abab0ff5bb1e8b594
     12 // removed in https://github.com/whatwg/html/commit/1a0b5e8377d59462e05a5cffda4b8592324a2785
     13 t('onbeforescriptexecute');
     14 t('onafterscriptexecute');
     15 
     16 var t_onbeforescriptexecute_attr = async_test('onbeforescriptexecute content attribute should not be supported');
     17 var t_onafterscriptexecute_attr = async_test('onafterscriptexecute content attribute should not be supported');
     18 var t_beforescriptexecute_event = async_test(function() {
     19  addEventListener('beforescriptexecute', this.step_func(function() {
     20    assert_unreached();
     21  }), true);
     22 }, 'beforescriptexecute event should not be supported');
     23 var t_afterscriptexecute_event = async_test(function() {
     24  addEventListener('afterscriptexecute', this.step_func(function() {
     25    assert_unreached();
     26  }), true);
     27 }, 'afterscriptexecute event should not be supported');
     28 
     29 var a = false;
     30 
     31 onload = function() {
     32  t_onbeforescriptexecute_attr.step(function() {
     33    assert_true(a);
     34    this.done();
     35  });
     36  t_onafterscriptexecute_attr.step(function() {
     37    assert_true(a);
     38    this.done();
     39  });
     40  t_beforescriptexecute_event.step(function() {
     41    assert_true(a);
     42    this.done();
     43  });
     44  t_afterscriptexecute_event.step(function() {
     45    assert_true(a);
     46    this.done();
     47  });
     48 };
     49 </script>
     50 <script onbeforescriptexecute="t_onbeforescriptexecute_attr.step(function() { assert_unreached(); });"
     51        onafterscriptexecute="t_onafterscriptexecute_attr.step(function() { assert_unreached(); });">
     52 a = true;
     53 </script>