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

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

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (Closed)
Patch Set: 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/debugging_inlined_finally_test.dart
diff --git a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
index 46d0089e214d314a05b8793f3aea0785c97d575f..7f867a218f5b6bc04077af1c755b81f1520fda24 100644
--- a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
+++ b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
@@ -21,13 +21,13 @@ testFunction() {
try {
for (int i = 0; i < 10; i++) {
var x = () => i + a + b;
- return x; // LINE_A
+ return x; // LINE_A
}
} finally {
- b = 10; // LINE_B
+ b = 10; // LINE_B
}
} finally {
- a = 1; // LINE_C
+ a = 1; // LINE_C
}
}
@@ -37,98 +37,100 @@ testMain() {
}
var tests = [
- hasStoppedAtBreakpoint,
+
+hasStoppedAtBreakpoint,
// Add breakpoint
- (Isolate isolate) async {
- await isolate.rootLibrary.load();
-
- var script = isolate.rootLibrary.scripts[0];
- await script.load();
-
- // Add 3 breakpoints.
- {
- var result = await isolate.addBreakpoint(script, LINE_A);
- expect(result is Breakpoint, isTrue);
- Breakpoint bpt = result;
- expect(bpt.type, equals('Breakpoint'));
- expect(bpt.location.script.id, equals(script.id));
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
- equals(LINE_A));
- expect(isolate.breakpoints.length, equals(1));
- }
+(Isolate isolate) async {
+ await isolate.rootLibrary.load();
+
+ var script = isolate.rootLibrary.scripts[0];
+ await script.load();
+
+ // Add 3 breakpoints.
+ {
+ var result = await isolate.addBreakpoint(script, LINE_A);
+ expect(result is Breakpoint, isTrue);
+ Breakpoint bpt = result;
+ expect(bpt.type, equals('Breakpoint'));
+ expect(bpt.location.script.id, equals(script.id));
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
+ equals(LINE_A));
+ expect(isolate.breakpoints.length, equals(1));
+ }
- {
- var result = await isolate.addBreakpoint(script, LINE_B);
- expect(result is Breakpoint, isTrue);
- Breakpoint bpt = result;
- expect(bpt.type, equals('Breakpoint'));
- expect(bpt.location.script.id, equals(script.id));
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
- equals(LINE_B));
- expect(isolate.breakpoints.length, equals(2));
- }
+ {
+ var result = await isolate.addBreakpoint(script, LINE_B);
+ expect(result is Breakpoint, isTrue);
+ Breakpoint bpt = result;
+ expect(bpt.type, equals('Breakpoint'));
+ expect(bpt.location.script.id, equals(script.id));
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
+ equals(LINE_B));
+ expect(isolate.breakpoints.length, equals(2));
+ }
- {
- var result = await isolate.addBreakpoint(script, LINE_C);
- expect(result is Breakpoint, isTrue);
- Breakpoint bpt = result;
- expect(bpt.type, equals('Breakpoint'));
- expect(bpt.location.script.id, equals(script.id));
- expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
- equals(LINE_C));
- expect(isolate.breakpoints.length, equals(3));
- }
+ {
+ var result = await isolate.addBreakpoint(script, LINE_C);
+ expect(result is Breakpoint, isTrue);
+ Breakpoint bpt = result;
+ expect(bpt.type, equals('Breakpoint'));
+ expect(bpt.location.script.id, equals(script.id));
+ expect(bpt.location.script.tokenToLine(bpt.location.tokenPos),
+ equals(LINE_C));
+ expect(isolate.breakpoints.length, equals(3));
+ }
- // Wait for breakpoint events.
- },
+ // Wait for breakpoint events.
+},
- resumeIsolate,
+resumeIsolate,
- hasStoppedAtBreakpoint,
+hasStoppedAtBreakpoint,
// We are at the breakpoint on line LINE_A.
- (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;
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
- equals(LINE_A));
- },
+ Script script = stack['frames'][0].location.script;
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
+ equals(LINE_A));
+},
- resumeIsolate,
+resumeIsolate,
- hasStoppedAtBreakpoint,
+hasStoppedAtBreakpoint,
// We are at the breakpoint on line LINE_B.
- (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;
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
- equals(LINE_B));
- },
+ Script script = stack['frames'][0].location.script;
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
+ equals(LINE_B));
+},
- resumeIsolate,
+resumeIsolate,
- hasStoppedAtBreakpoint,
+hasStoppedAtBreakpoint,
// We are at the breakpoint on line LINE_C.
- (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;
+ expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
+ equals(LINE_C));
+},
- Script script = stack['frames'][0].location.script;
- expect(script.tokenToLine(stack['frames'][0].location.tokenPos),
- equals(LINE_C));
- },
+resumeIsolate,
- resumeIsolate,
];
main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
« no previous file with comments | « runtime/observatory/tests/service/debugger_location_test.dart ('k') | runtime/observatory/tests/service/debugging_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698