зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1370102 - Make browser_console_dead_objects.js correctly wait for the window to be destroyed instead of relying on the scheduling of the corresponding event; r=kmag
This commit is contained in:
Родитель
bcf998a848
Коммит
30d7c12e39
|
@ -30,6 +30,8 @@ function test() {
|
|||
function* runner() {
|
||||
Services.prefs.setBoolPref("devtools.chrome.enabled", true);
|
||||
yield loadTab(TEST_URI);
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let winID = browser.outerWindowID;
|
||||
|
||||
info("open the browser console");
|
||||
|
||||
|
@ -50,6 +52,11 @@ function test() {
|
|||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
yield TestUtils.topicObserved("outer-window-destroyed", (subject, data) => {
|
||||
let id = subject.QueryInterface(Components.interfaces.nsISupportsPRUint64).data;
|
||||
return id == winID;
|
||||
});
|
||||
|
||||
let msg = yield jsterm.execute("foobarzTezt");
|
||||
|
||||
isnot(hud.outputNode.textContent.indexOf("[object DeadObject]"), -1,
|
||||
|
|
Загрузка…
Ссылка в новой задаче