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

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
« no previous file with comments | « tools/testing/extensions/firefox/ConsoleCollector/Makefile ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
@@ -22,12 +22,14 @@
var rtn = [];
for (var i = 0; i < messages.length; i++) {
var message = messages[i];
- rtn.push({ 'time' : message.timeStamp,
+ if (message.errorMessage) {
+ rtn.push({ 'time' : message.timeStamp,
'source' : message.sourceName,
'line': message.lineNumber,
'column': message.columnNumber,
'category': message.category,
'message' : message.errorMessage });
+ }
}
messages = [];
return rtn;
@@ -72,11 +74,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 +94,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);
« no previous file with comments | « tools/testing/extensions/firefox/ConsoleCollector/Makefile ('k') | tools/testing/run_selenium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698