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

Unified Diff: pkg/unittest/test_controller.js

Issue 11092015: Chrome extension to get console messages upon test failures. Unlike the (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: pkg/unittest/test_controller.js
===================================================================
--- pkg/unittest/test_controller.js (revision 13361)
+++ pkg/unittest/test_controller.js (working copy)
@@ -17,8 +17,22 @@
var waitForDone = false;
+var _callback;
+function getMessages(callback) {
+ _callback = callback;
+ window.postMessage("getMessages", "*");
+}
+
function processMessage(msg) {
- if (typeof msg != 'string') return;
+ if (typeof msg != 'string') {
+ if (msg.type == "gotMessages") {
+ if (_callback) {
+ _callback(msg.messages);
+ _callback = null;
+ }
+ }
+ return;
+ }
if (msg == 'unittest-suite-done') {
if (testRunner) testRunner.notifyDone();
} else if (msg == 'unittest-suite-wait-for-done') {
« no previous file with comments | « no previous file | tools/testing/extensions/chrome/ConsoleCollector/background.js » ('j') | tools/testing/run_selenium.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698