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

Unified Diff: dart/tests/isolate/isolate_stress_test.dart

Issue 19706007: Fix test wrapping issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « dart/tests/isolate/isolate.status ('k') | dart/tests/lib/mirrors/native_class_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/isolate/isolate_stress_test.dart
diff --git a/dart/tests/isolate/isolate_stress_test.dart b/dart/tests/isolate/isolate_stress_test.dart
index 685ea59ed88d4b0c5a20fe9ccda80bb26edace62..84a3447958c2341cd10e7f9c10f0ad8bb3347b46 100644
--- a/dart/tests/isolate/isolate_stress_test.dart
+++ b/dart/tests/isolate/isolate_stress_test.dart
@@ -7,14 +7,10 @@
// in dart2js).
import 'dart:async';
-import 'dart:html';
import 'dart:isolate';
-// TODO(ahe): Remove dependency on unittest when tests are wrapperless.
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-const bool IS_UNITTEST = true;
+// TODO(ahe): Remove this import when we have wrapper-less testing.
+import 'dart:html';
worker() {
port.receive((String uri, SendPort replyTo) {
@@ -24,7 +20,6 @@ worker() {
}
main() {
- useHtmlConfiguration();
try {
// Create a Worker to confuse broken isolate implementation in dart2js.
new Worker('data:application/javascript,').terminate();
@@ -38,25 +33,14 @@ main() {
throw new Exception('Unexpected reply from worker: $reply');
}
if (++isolateCount > 200) {
- if (IS_UNITTEST) {
- doneClosure();
- } else {
- port.close();
- window.postMessage('unittest-suite-done', '*');
- }
+ port.close();
+ window.postMessage('unittest-suite-success', '*');
return;
}
spawnFunction(worker).call('').then(spawnMany);
print('isolateCount = $isolateCount');
}
- if (IS_UNITTEST) {
- test('stress test', () {
- spawnMany('Hello from Worker');
- doneClosure = expectAsync0(() {});
- });
- } else {
- spawnMany('Hello from Worker');
- window.postMessage('unittest-suite-wait-for-done', '*');
- }
+ spawnMany('Hello from Worker');
+ window.postMessage('unittest-suite-wait-for-done', '*');
}
« no previous file with comments | « dart/tests/isolate/isolate.status ('k') | dart/tests/lib/mirrors/native_class_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698