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

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

Issue 1391953003: Fix evaluation in frames with _private variable names. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/eval_test.dart
diff --git a/runtime/observatory/tests/service/eval_test.dart b/runtime/observatory/tests/service/eval_test.dart
index c251be34e4d4f78250118105e880c42b863a4cf1..99dfe8f6c3534a13ef37e1e766cefb06b1fe33da 100644
--- a/runtime/observatory/tests/service/eval_test.dart
+++ b/runtime/observatory/tests/service/eval_test.dart
@@ -3,18 +3,19 @@
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--error_on_bad_type --error_on_bad_override
+import 'dart:async';
+import 'dart:developer';
import 'package:observatory/service_io.dart';
import 'package:unittest/unittest.dart';
import 'test_helper.dart';
-import 'dart:async';
int globalVar = 100;
class MyClass {
static int staticVar = 1000;
- static void printValue(int value) {
- print(value); // line 17
+ static void method(int value) {
+ debugger();
}
}
@@ -22,37 +23,14 @@ void testFunction() {
int i = 0;
while (true) {
if (++i % 100000000 == 0) {
- MyClass.printValue(10000);
+ MyClass.method(10000);
}
}
}
var tests = [
-// Go to breakpoint at line 16.
-(Isolate isolate) {
- return isolate.rootLibrary.load().then((_) {
- // Set up a listener to wait for breakpoint events.
- Completer completer = new Completer();
- isolate.vm.getEventStream(VM.kDebugStream).then((stream) {
- var subscription;
- subscription = stream.listen((ServiceEvent event) {
- if (event.kind == ServiceEvent.kPauseBreakpoint) {
- print('Breakpoint reached');
- subscription.cancel();
- completer.complete();
- }
- });
- });
-
- // Add the breakpoint.
- var script = isolate.rootLibrary.scripts[0];
- var line = 17;
- return isolate.addBreakpoint(script, line).then((ServiceObject bpt) {
- return completer.future; // Wait for breakpoint reached.
- });
- });
-},
+hasStoppedAtBreakpoint,
// Evaluate against library, class, and instance.
(Isolate isolate) {
@@ -60,7 +38,7 @@ var tests = [
// Make sure we are in the right place.
expect(stack.type, equals('Stack'));
expect(stack['frames'].length, greaterThanOrEqualTo(2));
- expect(stack['frames'][0].function.name, equals('printValue'));
+ expect(stack['frames'][0].function.name, equals('method'));
expect(stack['frames'][0].function.dartOwner.name, equals('MyClass'));
var lib = isolate.rootLibrary;
« no previous file with comments | « no previous file | runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart » ('j') | runtime/vm/debugger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698