Skip to content

Commit

Permalink
Merge pull request web-platform-tests#82 from zcorpan/submission/Oper…
Browse files Browse the repository at this point in the history
…a/onerror-data-url-muted-bugfix

<script src=data:...> should not mute the onerror arguments anymore per ...
  • Loading branch information
jgraham committed Apr 25, 2014
2 parents 2afee48 + 51c8cc3 commit 6fce270
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<body onerror="
t.step(function(){
ran = true;
assert_equals(event, 'Script error.', 'first arg');
assert_equals(source, '', 'second arg');
assert_equals(lineno, 0, 'third arg');
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(column, 0, 'fourth arg');
assert_equals(typeof column, 'number', 'fourth arg');
});
">
<div id=log></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
window.onerror = t.step_func(function(a, b, c, d){
ran = true;
col_value = d;
assert_equals(a, 'Script error.', 'first arg');
assert_equals(b, '', 'second arg');
assert_equals(c, 0, 'third arg');
assert_equals(typeof a, 'string', 'first arg');
assert_equals(b, 'data:text/javascript,for(;) {}', 'second arg');
assert_equals(typeof c, 'number', 'third arg');
});
</script>
<script src="data:text/javascript,for(;) {}"></script>
Expand All @@ -28,7 +28,7 @@
t.done();
});
t_col.step(function(){
assert_equals(col_value, 0, 'fourth arg');
assert_equals(typeof col_value, 'number', 'fourth arg');
t_col.done();
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
window.onerror = t.step_func(function(a, b, c, d){
ran = true;
col_value = d;
assert_equals(a, 'Script error.', 'first arg');
assert_equals(b, '', 'second arg');
assert_equals(c, 0, 'third arg');
assert_equals(typeof a, 'string', 'first arg');
assert_equals(b, 'data:text/javascript,undefined_variable;', 'second arg');
assert_equals(typeof c, 'number', 'third arg');
});
</script>
<script src="data:text/javascript,undefined_variable;"></script>
Expand All @@ -28,7 +28,7 @@
t.done();
});
t_col.step(function(){
assert_equals(col_value, 0, 'fourth arg');
assert_equals(typeof col_value, number, 'fourth arg');
t_col.done();
});
</script>
Expand Down

0 comments on commit 6fce270

Please sign in to comment.