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

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 13385)
+++ pkg/unittest/test_controller.js (working copy)
@@ -17,8 +17,22 @@
var waitForDone = false;
+var _callback;
ahe 2012/10/09 06:01:04 Could you add a comment to explain what is going o
Emily Fortuna 2012/10/09 18:15:22 +1
gram 2012/10/09 18:57:14 Done.
+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') {

Powered by Google App Engine
This is Rietveld 408576698