Index: pkg/unittest/lib/test_controller.js |
diff --git a/pkg/unittest/lib/test_controller.js b/pkg/unittest/lib/test_controller.js |
index 7cf66997d92e34f5d54b7e6c3215c32244d0587e..68b83bfe0a33f260a8ec4bcc9285d8c2b7868975 100644 |
--- a/pkg/unittest/lib/test_controller.js |
+++ b/pkg/unittest/lib/test_controller.js |
@@ -98,12 +98,17 @@ function processMessage(msg) { |
notifyDone(); |
} else if (msg == 'unittest-suite-wait-for-done') { |
waitForDone = true; |
- if (testRunner) testRunner.startedDartTest = true; |
+ if (testRunner) { |
+ testRunner.startedDartTest = true; |
+ } |
} else if (msg == 'dart-calling-main') { |
- if (testRunner) testRunner.startedDartTest = true; |
+ if (testRunner) { |
+ testRunner.startedDartTest = true; |
+ } |
} else if (msg == 'dart-main-done') { |
if (!waitForDone) { |
- window.postMessage('unittest-suite-success', '*'); |
+ printMessage('PASS'); |
+ notifyDone(); |
} |
} else if (msg == 'unittest-suite-success') { |
printMessage('PASS'); |