From f8bcb557026e53d7c97352a4840f505a79a1e9e6 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Sat, 28 Aug 2010 09:26:00 -0700 Subject: [PATCH] Bug 591008 - try again to fix orange from "image is logged - Didn't expect -1, but got it", r=ddahl, a=orange --- .../browser/browser_HUDServiceTestsAll.js | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js b/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js index 24323a985f3..abd4e1f1725 100644 --- a/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js +++ b/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js @@ -257,20 +257,28 @@ function testNet() browser.removeEventListener("load", onTestNetLoad, true); executeSoon(function(){ - let group = outputNode.querySelector(".hud-group"); - is(group.childNodes.length, 5, "Four children in output"); - let outputChildren = group.childNodes; + let group = outputNode.querySelector(".hud-group"); + is(group.childNodes.length, 5, "Four children in output"); + let outputChildren = group.childNodes; - isnot(outputChildren[1].textContent.indexOf("test-network.html"), -1, - "html page is logged"); - isnot(outputChildren[2].textContent.indexOf("testscript.js"), -1, - "javascript is logged"); - isnot(outputChildren[3].textContent.indexOf("test-image.png"), -1, - "image is logged"); - isnot(outputChildren[4].textContent. - indexOf("running network console logging tests"), -1, "log() is logged"); + isnot(outputChildren[1].textContent.indexOf("test-network.html"), -1, + "html page is logged"); + isnot(outputChildren[2].textContent.indexOf("testscript.js"), -1, + "javascript is logged"); + + let imageLogged = + (outputChildren[3].textContent.indexOf("test-image.png") != -1 || + outputChildren[4].textContent.indexOf("test-image.png") != -1); + ok(imageLogged, "image is logged"); + + let logOutput = "running network console logging tests"; + let logLogged = + (outputChildren[3].textContent.indexOf(logOutput) != -1 || + outputChildren[4].textContent.indexOf(logOutput) != -1); + ok(logLogged, "log() is logged") + + testLiveFilteringForMessageTypes(); }); - testLiveFilteringForMessageTypes(); }, true); content.location = TEST_NETWORK_URI;