fix completely broken browser_bug481560.js

--HG--
extra : rebase_source : 0c0b93b67504c9230c4fb3cced6de6a35e43a1c5
This commit is contained in:
Dão Gottwald 2009-11-06 22:44:11 +01:00
Родитель 5e3beb9848
Коммит eb8a1d8f47
1 изменённых файлов: 6 добавлений и 13 удалений

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

@ -1,15 +1,6 @@
function test() { function test() {
waitForExplicitFinish(); waitForExplicitFinish();
// focus the url field so that it will can ensure the focus is there when
// the window is refocused after the dialog closes
gURLBar.focus();
window.addEventListener("focus", function () {
window.removeEventListener("focus", arguments.callee, false);
finish();
}, false);
var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no"); var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
win.addEventListener("load", function () { win.addEventListener("load", function () {
@ -18,13 +9,15 @@ function test() {
win.content.addEventListener("focus", function () { win.content.addEventListener("focus", function () {
win.content.removeEventListener("focus", arguments.callee, false); win.content.removeEventListener("focus", arguments.callee, false);
win.gBrowser.selectedTab.addEventListener("TabClose", function () {
ok(false, "shouldn't have gotten the TabClose event for the last tab");
}, false);
EventUtils.synthesizeKey("w", { accelKey: true }, win); EventUtils.synthesizeKey("w", { accelKey: true }, win);
ok(win.closed, "accel+w closed the window immediately"); ok(win.closed, "accel+w closed the window immediately");
}, false);
win.gBrowser.selectedTab.addEventListener("TabClose", function () { finish();
ok(false, "shouldn't have gotten the TabClose event for the last tab");
}, false); }, false);
}, false); }, false);
} }