summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/scripting/processing-model-2/runtime-error-in-window-onerror.html
blob: 150a793b79ea99abe5d1ec71fdb517bc8140bd81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!doctype html>
<html>
 <head>
  <title>runtime error in window.onerror</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
 <div id=log></div>
  <script>
    setup({allow_uncaught_exception:true});
    var t = async_test();
    var ran = 0;
    window.onerror = function(){
        ran++;
        undefined_variable_in_onerror;
    };
  </script>
  <script>
    undefined_variable;
  </script>
  <script>
    t.step(function(){
        assert_equals(ran, 1, 'ran');
        t.done();
    });
  </script>
 </body>
</html>