Backout experimental changes to randomly failing sessionstore browser tests (uneffective)

This commit is contained in:
Marco Bonardo 2009-10-17 14:37:35 +02:00
Родитель 39d97011a4
Коммит 36397bbd2a
3 изменённых файлов: 50 добавлений и 55 удалений

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

@ -92,10 +92,9 @@ function test() {
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_A); let newWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_A);
newWin.addEventListener("load", function(aEvent) { newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false); newWin.removeEventListener("load", arguments.callee, false);
info("New window has been opened"); newWin.gBrowser.addEventListener("load", function(aEvent) {
newWin.gBrowser.addEventListener("pageshow", function(aEvent) { newWin.gBrowser.removeEventListener("load", arguments.callee, true);
newWin.gBrowser.removeEventListener("pageshow", arguments.callee, true); info("Window has been loaded");
info("Content has been loaded");
executeSoon(function() { executeSoon(function() {
newWin.gBrowser.addTab(); newWin.gBrowser.addTab();
executeSoon(function() { executeSoon(function() {
@ -127,8 +126,8 @@ function test() {
let pbWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_B); let pbWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_B);
pbWin.addEventListener("load", function(aEvent) { pbWin.addEventListener("load", function(aEvent) {
pbWin.removeEventListener("load", arguments.callee, false); pbWin.removeEventListener("load", arguments.callee, false);
pbWin.gBrowser.addEventListener("pageshow", function(aEvent) { pbWin.gBrowser.addEventListener("load", function(aEvent) {
pbWin.gBrowser.removeEventListener("pageshow", arguments.callee, true); pbWin.gBrowser.removeEventListener("load", arguments.callee, true);
executeSoon(function() { executeSoon(function() {
// Add another tab, though it's not strictly needed // Add another tab, though it's not strictly needed

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

@ -56,7 +56,6 @@ function test() {
frameCount = 0; frameCount = 0;
let tab2 = gBrowser.duplicateTab(tab); let tab2 = gBrowser.duplicateTab(tab);
executeSoon(function() {
tab2.linkedBrowser.addEventListener("load", function(aEvent) { tab2.linkedBrowser.addEventListener("load", function(aEvent) {
// wait for all frames to load (and reload!) completely // wait for all frames to load (and reload!) completely
if (frameCount++ < 2) if (frameCount++ < 2)
@ -87,6 +86,5 @@ function test() {
finish(); finish();
}); });
}, true); }, true);
});
}, true); }, true);
} }

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

@ -47,7 +47,6 @@ function test() {
this.removeEventListener("load", arguments.callee, true); this.removeEventListener("load", arguments.callee, true);
executeSoon(function() { executeSoon(function() {
let tab2 = gBrowser.duplicateTab(tab); let tab2 = gBrowser.duplicateTab(tab);
executeSoon(function() {
tab2.linkedBrowser.addEventListener("461743", function(aEvent) { tab2.linkedBrowser.addEventListener("461743", function(aEvent) {
tab2.linkedBrowser.removeEventListener("461743", arguments.callee, true); tab2.linkedBrowser.removeEventListener("461743", arguments.callee, true);
is(aEvent.data, "done", "XSS injection was attempted"); is(aEvent.data, "done", "XSS injection was attempted");
@ -66,6 +65,5 @@ function test() {
}); });
}, true, true); }, true, true);
}); });
});
}, true); }, true);
} }