mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1146926: Fix SDK remote tests to pass with e10s enabled. r=gabor
By not waiting for the tab to finish loading we end up accidentally killing the child process somehow and later tests that expect a child process to be present fail.
This commit is contained in:
parent
999aef98b8
commit
5f435fdf37
@ -46,6 +46,7 @@ exports["test process restart"] = function*(assert) {
|
||||
let tabs = getTabs(window);
|
||||
assert.equal(tabs.length, 1, "Should have just the one tab to start with");
|
||||
let tab = tabs[0];
|
||||
let browser = getBrowserForTab(tab);
|
||||
|
||||
let loader = new Loader(module);
|
||||
let { processes, frames } = yield waitForProcesses(loader);
|
||||
@ -59,6 +60,7 @@ exports["test process restart"] = function*(assert) {
|
||||
let frameDetach = promiseEventOnItemAndContainer(assert, remoteFrame, frames, 'detach');
|
||||
let frameAttach = promiseTabFrameAttach(frames);
|
||||
let processDetach = promiseEventOnItemAndContainer(assert, remoteProcess, processes, 'detach');
|
||||
let browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, LOCAL_URI);
|
||||
// The load should kill the remote frame
|
||||
yield frameDetach;
|
||||
@ -67,10 +69,12 @@ exports["test process restart"] = function*(assert) {
|
||||
assert.equal(newFrame.process, localProcess, "New frame should be in the local process");
|
||||
// And kill the process
|
||||
yield processDetach;
|
||||
yield browserLoad;
|
||||
|
||||
frameDetach = promiseEventOnItemAndContainer(assert, newFrame, frames, 'detach');
|
||||
let processAttach = promiseEvent(processes, 'attach');
|
||||
frameAttach = promiseTabFrameAttach(frames);
|
||||
browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, REMOTE_URI);
|
||||
// The load should kill the remote frame
|
||||
yield frameDetach;
|
||||
@ -80,8 +84,11 @@ exports["test process restart"] = function*(assert) {
|
||||
// And create a new frame in the remote process
|
||||
[newFrame] = yield frameAttach;
|
||||
assert.equal(newFrame.process, remoteProcess, "New frame should be in the remote process");
|
||||
yield browserLoad;
|
||||
|
||||
browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, "about:blank");
|
||||
yield browserLoad;
|
||||
|
||||
loader.unload();
|
||||
};
|
||||
|
@ -46,6 +46,7 @@ exports["test process restart"] = function*(assert) {
|
||||
let tabs = getTabs(window);
|
||||
assert.equal(tabs.length, 1, "Should have just the one tab to start with");
|
||||
let tab = tabs[0];
|
||||
let browser = getBrowserForTab(tab);
|
||||
|
||||
let loader = new Loader(module);
|
||||
let { processes, frames } = yield waitForProcesses(loader);
|
||||
@ -59,6 +60,7 @@ exports["test process restart"] = function*(assert) {
|
||||
let frameDetach = promiseEventOnItemAndContainer(assert, remoteFrame, frames, 'detach');
|
||||
let frameAttach = promiseTabFrameAttach(frames);
|
||||
let processDetach = promiseEventOnItemAndContainer(assert, remoteProcess, processes, 'detach');
|
||||
let browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, LOCAL_URI);
|
||||
// The load should kill the remote frame
|
||||
yield frameDetach;
|
||||
@ -67,10 +69,12 @@ exports["test process restart"] = function*(assert) {
|
||||
assert.equal(newFrame.process, localProcess, "New frame should be in the local process");
|
||||
// And kill the process
|
||||
yield processDetach;
|
||||
yield browserLoad;
|
||||
|
||||
frameDetach = promiseEventOnItemAndContainer(assert, newFrame, frames, 'detach');
|
||||
let processAttach = promiseEvent(processes, 'attach');
|
||||
frameAttach = promiseTabFrameAttach(frames);
|
||||
browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, REMOTE_URI);
|
||||
// The load should kill the remote frame
|
||||
yield frameDetach;
|
||||
@ -80,8 +84,11 @@ exports["test process restart"] = function*(assert) {
|
||||
// And create a new frame in the remote process
|
||||
[newFrame] = yield frameAttach;
|
||||
assert.equal(newFrame.process, remoteProcess, "New frame should be in the remote process");
|
||||
yield browserLoad;
|
||||
|
||||
browserLoad = promiseDOMEvent(browser, "load", true);
|
||||
setTabURL(tab, "about:blank");
|
||||
yield browserLoad;
|
||||
|
||||
loader.unload();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user