Skip to content

Commit

Permalink
Fix per bzbarsky's review
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Nov 3, 2016
1 parent 483206c commit e8179c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion workers/Worker_ErrorEvent_after_navigation.htm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
const windowProxy = iframe.contentWindow;

window.addEventListener("load", t.step_func(() => {
windowProxy.onerror = t.unreached_func("The navigated-away-from Window error event must never fire");
windowProxy.doWorkerStuffAndExpectNoError(t);

iframe.addEventListener("load", t.step_func(() => {
windowProxy.onerror = t.unreached_func("The navigated-away-from Window error event must never fire");

// The test passes if no error events have been fired within this time.
setTimeout(t.step_func_done(), 300);
Expand Down
5 changes: 1 addition & 4 deletions workers/Worker_ErrorEvent_after_navigation_support-1.htm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
window.doWorkerStuffAndExpectError = t => {
const worker = new Worker("./support/error-after-some-time.js");
worker.onerror = t.step_func_done(ev => {
// Cannot use assert_equals since including testharness.js makes it believe this is a test file.
if (ev.constructor !== ErrorEvent) {
throw new Error("The worker error event must fire");
}
parent.assert_equals(ev.constructor, ErrorEvent, "The worker error event must fire");
});

worker.postMessage("error expected");
Expand Down

0 comments on commit e8179c9

Please sign in to comment.