Backed out changeset 6e4cddb22430 in order to fix debug test failures

This commit is contained in:
Dão Gottwald 2010-10-17 21:34:08 +02:00
parent ac4aee4e8c
commit fc5b43c997

View File

@ -10,10 +10,9 @@ function testBFCache() {
function theTest() {
var abort = false;
var chances, gImage, gFrames;
gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "image.html");
gBrowser.selectedBrowser.addEventListener("pageshow", function () {
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
var window = gBrowser.contentWindow;
gBrowser.selectedTab = gBrowser.addTab();
switchToTabHavingURI(TESTROOT + "image.html", true, function(aBrowser) {
var window = aBrowser.contentWindow;
// If false, we are in an optimized build, and we abort this and
// all further tests
if (!actOnMozImage(window.document, "img1", function(image) {
@ -24,7 +23,7 @@ function testBFCache() {
abort = true;
}
goer.next();
}, true);
});
yield;
if (abort) {
finish();
@ -109,35 +108,33 @@ function testSharedContainers() {
var gImages = [];
var gFrames;
gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "image.html");
gBrowser.selectedBrowser.addEventListener("pageshow", function () {
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
actOnMozImage(gBrowser.contentDocument, "img1", function(image) {
gBrowser.selectedTab = gBrowser.addTab();
switchToTabHavingURI(TESTROOT + "image.html", true, function(aBrowser) {
actOnMozImage(aBrowser.contentWindow.window.document, "img1", function(image) {
gImages[0] = image;
gFrames = image.framesNotified; // May in theory have frames from last test
// in this counter - so subtract them out
});
goer.next();
}, true);
});
yield;
// Load next tab somewhat later
gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
gTimer.initWithCallback(function() {
gBrowser.selectedTab = gBrowser.addTab();
goer.next();
}, 1500, Ci.nsITimer.TYPE_ONE_SHOT);
yield;
gBrowser.selectedTab = gBrowser.addTab(TESTROOT + "imageX2.html");
gBrowser.selectedBrowser.addEventListener("pageshow", function () {
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
switchToTabHavingURI(TESTROOT + "imageX2.html", true, function(aBrowser) {
[1,2].forEach(function(i) {
actOnMozImage(aBrowser.contentDocument, "img"+i, function(image) {
actOnMozImage(aBrowser.contentWindow.window.document, "img"+i, function(image) {
gImages[i] = image;
});
});
goer.next();
}, true);
});
yield;
chances = 120;