Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent harness timeout after calling window.stop() #9973

Conversation

@AnthumChris
Copy link
Member

AnthumChris commented Mar 12, 2018

window.stop() prevents window.onload from firing, which causes a harness timeout
This fixes that, and the natural flow of things returns after window.stop().

Relates to #9959

prevent harness timeout after calling window.stop()
window.stop() prevents window.onload from firing, which causes a harness timeout
This fixes that, and the natural flow of things returns after window.stop()
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 12, 2018

Build PASSED

Started: 2018-03-13 08:31:20
Finished: 2018-03-13 08:44:29

View more information about this build on:

test.done();
// Prevent harness timeout caused by window.stop() preventing "load" event
window.dispatchEvent(new Event('load'));

This comment has been minimized.

Copy link
@annevk

annevk Mar 12, 2018

Member

Does this emulate some code in the harness that dispatches a load event? How does this work?

cc @jgraham

This comment has been minimized.

Copy link
@AnthumChris

AnthumChris Mar 12, 2018

Author Member

Exactly. Normally, window.onload is fired, which triggers test_environment.add_on_loaded_callback to be called. window.stop() prevents that being called, so we invoke it manually after the tests run and complete.

This comment has been minimized.

Copy link
@annevk

annevk Mar 12, 2018

Member

Thanks. I think @jgraham needs to sign off on this. It seems we might want dedicated API instead so we can identify the tests that need this more easily.

@Ms2ger

This comment has been minimized.

Copy link
Contributor

Ms2ger commented Mar 16, 2018

Would it also work to move the code into an iframe or something?

@zcorpan

This comment has been minimized.

Copy link
Contributor

zcorpan commented May 31, 2018

This was fixed in a different way in aa09129

I think a third way to solve this would be to use setup({explicit_done: true}) and call done() at the end.

@zcorpan zcorpan closed this May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.