Skip to content

Commit

Permalink
Wrap an assert in step_func in a CSP test
Browse files Browse the repository at this point in the history
Previously, this test caused a harness error in Firefox and Safari, now
the test itself fails correctly instead.

Found via #10877 (comment).
  • Loading branch information
foolip committed Aug 3, 2018
1 parent 1413fe6 commit d481e92
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
<script>
var t1 = async_test("Test that the inline style attribute is loaded");

function check_for_style() {
self.check_for_style = t1.step_func_done(function() {
assert_equals("green", document.getElementById('test').style.background);
t1.done();
}
});

window.addEventListener('securitypolicyviolation', t1.unreached_func("Should have not raised any event"));
</script>
Expand Down

0 comments on commit d481e92

Please sign in to comment.