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

Side by Side Diff: runtime/observatory/tests/service/service_test_common.dart

Issue 1907743002: Add heart beat tests to make sure we see an isolate's sticky error after exit (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/service/get_isolate_after_sync_error_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library service_test_common; 5 library service_test_common;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:observatory/service_common.dart'; 8 import 'package:observatory/service_common.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 Future<Isolate> hasStoppedAtBreakpoint(Isolate isolate) { 135 Future<Isolate> hasStoppedAtBreakpoint(Isolate isolate) {
136 return hasPausedFor(isolate, ServiceEvent.kPauseBreakpoint); 136 return hasPausedFor(isolate, ServiceEvent.kPauseBreakpoint);
137 } 137 }
138 138
139 Future<Isolate> hasStoppedWithUnhandledException(Isolate isolate) { 139 Future<Isolate> hasStoppedWithUnhandledException(Isolate isolate) {
140 return hasPausedFor(isolate, ServiceEvent.kPauseException); 140 return hasPausedFor(isolate, ServiceEvent.kPauseException);
141 } 141 }
142 142
143 Future<Isolate> hasStoppedAtExit(Isolate isolate) {
144 return hasPausedFor(isolate, ServiceEvent.kPauseExit);
145 }
146
143 Future<Isolate> hasPausedAtStart(Isolate isolate) { 147 Future<Isolate> hasPausedAtStart(Isolate isolate) {
144 return hasPausedFor(isolate, ServiceEvent.kPauseStart); 148 return hasPausedFor(isolate, ServiceEvent.kPauseStart);
145 } 149 }
146 150
147 // Currying is your friend. 151 // Currying is your friend.
148 IsolateTest setBreakpointAtLine(int line) { 152 IsolateTest setBreakpointAtLine(int line) {
149 return (Isolate isolate) async { 153 return (Isolate isolate) async {
150 print("Setting breakpoint for line $line"); 154 print("Setting breakpoint for line $line");
151 Library lib = await isolate.rootLibrary.load(); 155 Library lib = await isolate.rootLibrary.load();
152 Script script = lib.scripts.single; 156 Script script = lib.scripts.single;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 247
244 Future<Instance> rootLibraryFieldValue(Isolate isolate, 248 Future<Instance> rootLibraryFieldValue(Isolate isolate,
245 String fieldName) async { 249 String fieldName) async {
246 Library rootLib = await isolate.rootLibrary.load(); 250 Library rootLib = await isolate.rootLibrary.load();
247 Field field = rootLib.variables.singleWhere((v) => v.name == fieldName); 251 Field field = rootLib.variables.singleWhere((v) => v.name == fieldName);
248 await field.load(); 252 await field.load();
249 Instance value = field.staticValue; 253 Instance value = field.staticValue;
250 await value.load(); 254 await value.load();
251 return value; 255 return value;
252 } 256 }
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/get_isolate_after_sync_error_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698