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

Unified Diff: runtime/observatory/tests/service/steal_breakpoint_test.dart

Issue 2751423005: Run dartfmt on all files under runtime. (Closed)
Patch Set: Run dartfmt on all files under runtime. Created 3 years, 9 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/tests/service/steal_breakpoint_test.dart
diff --git a/runtime/observatory/tests/service/steal_breakpoint_test.dart b/runtime/observatory/tests/service/steal_breakpoint_test.dart
index 5c7c1b6c628e6f8e77a84f98e61386f6e2c84d9b..63514dd1d1bd379ab095ded87b795d28ef29f21a 100644
--- a/runtime/observatory/tests/service/steal_breakpoint_test.dart
+++ b/runtime/observatory/tests/service/steal_breakpoint_test.dart
@@ -11,70 +11,69 @@ import 'dart:async';
int counter = 0;
void periodicTask(_) {
- counter++; // Line 14. We set our breakpoint here.
+ counter++; // Line 14. We set our breakpoint here.
if (counter % 1000 == 0) {
print('counter = $counter');
}
}
void startTimer() {
- new Timer.periodic(const Duration(milliseconds:10), periodicTask);
+ new Timer.periodic(const Duration(milliseconds: 10), periodicTask);
}
var tests = [
-
// Add a breakpoint and wait for it to be reached.
-(Isolate isolate) async {
- await isolate.rootLibrary.load();
+ (Isolate isolate) async {
+ await isolate.rootLibrary.load();
- // Set up a listener to wait for breakpoint events.
- Completer completer = new Completer();
- var stream = await isolate.vm.getEventStream(VM.kDebugStream);
- var subscription;
- subscription = stream.listen((ServiceEvent event) {
- if (event.kind == ServiceEvent.kPauseBreakpoint) {
- print('Isolate paused at breakpoint');
- subscription.cancel();
- completer.complete();
- }
- });
+ // Set up a listener to wait for breakpoint events.
+ Completer completer = new Completer();
+ var stream = await isolate.vm.getEventStream(VM.kDebugStream);
+ var subscription;
+ subscription = stream.listen((ServiceEvent event) {
+ if (event.kind == ServiceEvent.kPauseBreakpoint) {
+ print('Isolate paused at breakpoint');
+ subscription.cancel();
+ completer.complete();
+ }
+ });
- // Add the breakpoint.
- var script = isolate.rootLibrary.scripts[0];
- var result = await isolate.addBreakpoint(script, 14);
- expect(result is Breakpoint, isTrue);
+ // Add the breakpoint.
+ var script = isolate.rootLibrary.scripts[0];
+ var result = await isolate.addBreakpoint(script, 14);
+ expect(result is Breakpoint, isTrue);
- await completer.future; // Wait for breakpoint event to fire.
-},
+ await completer.future; // Wait for breakpoint event to fire.
+ },
// We are at the breakpoint on line 14.
-(Isolate isolate) async {
- ServiceMap stack = await isolate.getStack();
- expect(stack.type, equals('Stack'));
- expect(stack['frames'].length, greaterThanOrEqualTo(1));
+ (Isolate isolate) async {
+ ServiceMap stack = await isolate.getStack();
+ expect(stack.type, equals('Stack'));
+ expect(stack['frames'].length, greaterThanOrEqualTo(1));
- Script script = stack['frames'][0].location.script;
- await script.load();
- expect(script.name,endsWith('steal_breakpoint_test.dart'));
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos), equals(14));
-},
+ Script script = stack['frames'][0].location.script;
+ await script.load();
+ expect(script.name, endsWith('steal_breakpoint_test.dart'));
+ expect(
+ script.tokenToLine(stack['frames'][0].location.tokenPos), equals(14));
+ },
// Resume
-(Isolate isolate) async {
- Completer completer = new Completer();
- var stream = await isolate.vm.getEventStream(VM.kDebugStream);
- var subscription;
- subscription = stream.listen((ServiceEvent event) {
- if (event.kind == ServiceEvent.kResume) {
- print('Isolate resumed');
- subscription.cancel();
- completer.complete();
- }
- });
- isolate.resume();
- await completer.future;
-},
-
+ (Isolate isolate) async {
+ Completer completer = new Completer();
+ var stream = await isolate.vm.getEventStream(VM.kDebugStream);
+ var subscription;
+ subscription = stream.listen((ServiceEvent event) {
+ if (event.kind == ServiceEvent.kResume) {
+ print('Isolate resumed');
+ subscription.cancel();
+ completer.complete();
+ }
+ });
+ isolate.resume();
+ await completer.future;
+ },
];
main(args) => runIsolateTests(args, tests, testeeBefore: startTimer);

Powered by Google App Engine
This is Rietveld 408576698