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

Unified Diff: runtime/observatory/test/coverage_test.dart

Issue 961483002: Fix isolate lifecycle handling in service library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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: runtime/observatory/test/coverage_test.dart
diff --git a/runtime/observatory/test/coverage_test.dart b/runtime/observatory/test/coverage_test.dart
index aa5eaf251e1a2828a02b672ee220251b63b7a35f..67d050479158491c9239f5472ba9edad74a0cca2 100644
--- a/runtime/observatory/test/coverage_test.dart
+++ b/runtime/observatory/test/coverage_test.dart
@@ -64,12 +64,16 @@ var tests = [
}
});
- // Add the breakpoint.
- var script = isolate.rootLib.scripts[0];
- var line = 14;
- return isolate.addBreakpoint(script, line).then((ServiceObject bpt) {
- return completer.future; // Wait for breakpoint reached.
+ // Create a timer to set a breakpoint with a short delay.
+ new Timer(new Duration(milliseconds: 2000), () {
+ // Add the breakpoint.
+ print('Setting breakpoint.');
+ var script = isolate.rootLib.scripts[0];
+ var line = 14;
+ isolate.addBreakpoint(script, line);
});
+
+ return completer.future;
});
},
@@ -118,7 +122,6 @@ var tests = [
23, 1, 24, 1, 26, 0]));
expect(normalize(coverage['coverage'][1]['hits']).take(12),
equals([32, 0, 35, 0, 36, 0, 32, 1, 35, 1, 36, 0]));
-
}));
// Script
tests.add(cls.load().then((_) {
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/observatory/test/isolate_lifecycle_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698