summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url.html
blob: 66e1dfed4dd182ab33a68d79881d6096fd13ba67 (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
30
31
32
33
34
35
36
37
<!doctype html>
<html>
 <head>
  <title>&lt;body onerror> - compile error in &lt;script src=data:...></title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
 </head>
  <script>
    setup({allow_uncaught_exception:true});
    var t = async_test();
    var t_col = async_test(document.title+' (column)');
    var ran = false;
  </script>
 <body onerror="
    t.step(function(){
        ran = true;
        assert_equals(typeof event, 'string', 'first arg');
        assert_equals(source, 'data:text/javascript,for(;){}', 'second arg');
        assert_equals(typeof lineno, 'number', 'third arg');
    });
    t_col.step(function() {
        assert_equals(typeof colno, 'number', 'fourth arg');
    });
    ">
  <div id=log></div>
  <script src="data:text/javascript,for(;){}"></script>
  <script>
    t.step(function(){
        assert_true(ran, 'ran');
        t.done();
    });
    t_col.step(function(){
        t_col.done();
    });
  </script>
 </body>
</html>