Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Unified Diff: tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js

Issue 11028067: Fixed the issue with the ConsoleCollector extension causing FF to hang if run from WebDriver. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js
===================================================================
--- tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js (revision 13269)
+++ tools/testing/extensions/firefox/ConsoleCollector/chrome/content/console.js (working copy)
@@ -72,11 +72,16 @@
if (consoleService) {
consoleService.registerListener(consoleListener);
}
+ // Add the handler for hooking in to each page's DOM. This handler
+ // is for each "gBrowser", representing a tab/window.
+ window.getBrowser().addEventListener("load", onPageLoad, true);
}
// Stop collecting console messages.
function shutdown(event) {
+ window.getBrowser().removeEventListener("load", onPageLoad);
consoleService.unregisterListener(consoleListener);
+ ConsoleCollector.clear();
}
// Hook the ConsoleCollector into the DOM as window.ConsoleCollector.
@@ -87,9 +92,6 @@
}
};
- // Add the handler for hooking in to each page's DOM. This handler
- // is for each "gBrowser", representing a tab/window.
- window.getBrowser().addEventListener("load", onPageLoad, true);
// Add the handlers to initialize the add-on and shut it down.
// These handlers are for the application as a whole.
window.addEventListener('load', initialize, false);

Powered by Google App Engine
This is Rietveld 408576698