| Index: runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart
|
| diff --git a/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart b/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..053fd158951d7200c6429e90d645db5371b204c1
|
| --- /dev/null
|
| +++ b/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart
|
| @@ -0,0 +1,47 @@
|
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// 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';
|
| +
|
| +void method(int value, _) {
|
| + debugger();
|
| +}
|
| +
|
| +void testFunction() {
|
| + int i = 0;
|
| + while (true) {
|
| + if (++i % 100000000 == 0) {
|
| + method(10000, 50);
|
| + }
|
| + }
|
| +}
|
| +
|
| +var tests = [
|
| +
|
| +hasStoppedAtBreakpoint,
|
| +
|
| +// Evaluate against library, class, and instance.
|
| +(Isolate isolate) async {
|
| + var result;
|
| + result = await isolate.evalFrame(0, 'value');
|
| + expect(result.valueAsString, equals('10000'));
|
| +
|
| + result = await isolate.evalFrame(0, '_');
|
| + expect(result.valueAsString, equals('50'));
|
| +
|
| + result = await isolate.evalFrame(0, 'value + _');
|
| + expect(result.valueAsString, equals('10050'));
|
| +
|
| + result = await isolate.evalFrame(1, 'i');
|
| + expect(result.valueAsString, equals('100000000'));
|
| +},
|
| +
|
| +];
|
| +
|
| +main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
|
|
|