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:
Ehsan Akhgari 2017-05-30 16:38:56 -04:00
Родитель bcf998a848
Коммит 30d7c12e39
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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,