From 7b589c4904052fb89d17f6b807891ea95f797964 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Wed, 17 Nov 2010 14:28:40 -0500 Subject: [PATCH] Adding some temporary test debugging output [r=me] --- mobile/chrome/tests/browser_awesomescreen.js | 6 +++++- mobile/chrome/tests/browser_bookmarks.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mobile/chrome/tests/browser_awesomescreen.js b/mobile/chrome/tests/browser_awesomescreen.js index 8e9b9a3ac76..cd1be512f34 100644 --- a/mobile/chrome/tests/browser_awesomescreen.js +++ b/mobile/chrome/tests/browser_awesomescreen.js @@ -13,7 +13,6 @@ function test() { // The "runNextTest" approach is async, so we need to call "waitForExplicitFinish()" // We call "finish()" when the tests are finished waitForExplicitFinish(); - requestLongerTimeout(2); // Start the tests setTimeout(runNextTest, 200); @@ -206,12 +205,15 @@ gTests.push({ desc: "Test opening the awesome panel and checking the urlbar selection", run: function() { + info("opening new tab") this._currentTab = BrowserUI.newTab(testURL_01); // Need to wait until the page is loaded messageManager.addMessageListener("pageshow", function(aMessage) { + info("got a pageshow: " + gCurrentTest._currentTab.browser.currentURI.spec) if (gCurrentTest._currentTab.browser.currentURI.spec != "about:blank") { + info("got the right pageshow") messageManager.removeMessageListener(aMessage.name, arguments.callee); gCurrentTest.onPageReady(); } @@ -220,10 +222,12 @@ gTests.push({ onPageReady: function() { window.addEventListener("NavigationPanelShown", function(aEvent) { + info("nav panel is open") window.removeEventListener(aEvent.type, arguments.callee, false); gCurrentTest.onPopupReady(); }, false); + info("opening nav panel") AllPagesList.doCommand(); }, diff --git a/mobile/chrome/tests/browser_bookmarks.js b/mobile/chrome/tests/browser_bookmarks.js index 2b968512b0d..13b9c2cd7c3 100644 --- a/mobile/chrome/tests/browser_bookmarks.js +++ b/mobile/chrome/tests/browser_bookmarks.js @@ -82,11 +82,14 @@ gTests.push({ _currentTab: null, run: function() { + info("opening new tab") this._currentTab = Browser.addTab(testURL_02, true); // Need to wait until the page is loaded messageManager.addMessageListener("pageshow", function(aMessage) { + info("got a pageshow: " + gCurrentTest._currentTab.browser.currentURI.spec) if (gCurrentTest._currentTab.browser.currentURI.spec != "about:blank") { + info("got the right pageshow") messageManager.removeMessageListener(aMessage.name, arguments.callee); gCurrentTest.onPageReady(); } @@ -96,10 +99,12 @@ gTests.push({ onPageReady: function() { // Wait for the bookmarks to load, then do the test window.addEventListener("NavigationPanelShown", gCurrentTest.onBookmarksReady, false); + info("opening nav panel") BrowserUI.doCommand("cmd_bookmarks"); }, onBookmarksReady: function() { + info("nav panel is open") window.removeEventListener("NavigationPanelShown", gCurrentTest.onBookmarksReady, false); let bookmarkitem = document.getAnonymousElementByAttribute(BookmarkList.panel, "uri", testURL_01);