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

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

Issue 2486213002: Test showing crash when stepping through new Map creation. (Closed)
Patch Set: Marked test as failing in debug mode. Created 4 years, 1 month 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/service.status ('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
(Empty)
1 import 'dart:async';
2 import 'test_helper.dart';
3 import 'service_test_common.dart';
4 import 'package:observatory/service_io.dart';
5 import 'package:unittest/unittest.dart';
6
7 const int LINE_A = 10;
8
9 code() {
10 var x = {}; // LINE_A
11 }
12
13 Future<Isolate> stepThroughProgram(Isolate isolate) async {
14 Completer completer = new Completer();
15 int pauseEventsSeen = 0;
16 isolate.vm.getEventStream(VM.kDebugStream).then((stream) {
Cutch 2016/11/09 14:48:49 Have you considered using helper routines from ser
17 stream.listen((ServiceEvent event) {
18 if (event.kind == ServiceEvent.kPauseBreakpoint) {
19 // We are paused: Step further.
20 pauseEventsSeen++;
21 isolate.stepInto();
22 } else if (event.kind == ServiceEvent.kPauseExit) {
23 // We are at the exit: The test is done.
24 expect(pauseEventsSeen > 20, true,
25 reason: "Saw only $pauseEventsSeen pause events.");
26 completer.complete();
27 }
28 });
29 });
30
31 // We expect to start paused.
32 expect(isEventOfKind(isolate.pauseEvent, ServiceEvent.kPauseStart), true);
Cutch 2016/11/09 14:48:49 It's possible that the isolate hasn't paused at st
33
34 // Set breakpoint at the "var x = {};" line.
35 var rootLib = isolate.rootLibrary;
36 await rootLib.load();
37 isolate.addBreakpoint(rootLib.scripts[0], LINE_A);
38
39 // Resume (and step on every pause via the event stream listener above).
40 isolate.resume();
41
42 // The test is done once the completer is complete.
43 return completer.future;
44 }
45
46 var tests = [stepThroughProgram];
47
48 main(args) => runIsolateTestsSynchronous(args, tests,
49 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/service.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698