Repository navigation
prevent harness timeout after calling window.stop() - #9973
anthumchris wants to merge 1 commit into
Conversation
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()
Build PASSEDStarted: 2018-03-13 08:31:20 View more information about this build on: |
| test.done(); | ||
|
|
||
| // Prevent harness timeout caused by window.stop() preventing "load" event | ||
| window.dispatchEvent(new Event('load')); |
There was a problem hiding this comment.
Does this emulate some code in the harness that dispatches a load event? How does this work?
cc @jgraham
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
Would it also work to move the code into an iframe or something? |
|
This was fixed in a different way in aa09129 I think a third way to solve this would be to use |
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