| Index: LayoutTests/dart/inspector/scope-variables.dart
|
| diff --git a/LayoutTests/dart/inspector/scope-variables.dart b/LayoutTests/dart/inspector/scope-variables.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8ea6dfda481966ecaf341c597c140091fabcd669
|
| --- /dev/null
|
| +++ b/LayoutTests/dart/inspector/scope-variables.dart
|
| @@ -0,0 +1,47 @@
|
| +library scope_variables_test;
|
| +
|
| +import 'dart:core' as core; // import with prefix so global dart:core fields don't appear in scope chain.
|
| +import 'dart:html' as html; // import with prefix so global dart:html fields don't appear in scope chain.
|
| +
|
| +main() {
|
| + html.window.onMessage.listen(handleMessage);
|
| +}
|
| +
|
| +handleMessage(event) {
|
| + if (event.data == 'fromJS') {
|
| + handleMessage2(event);
|
| + }
|
| +}
|
| +
|
| +handleMessage2(event) {
|
| + var b = false;
|
| + var i = 42;
|
| + var d = 1.618;
|
| + var _s = 'foo';
|
| + var l = [1, 2, 3];
|
| + A a1 = new A(3.14);
|
| + A a2;
|
| + html.window.postMessage('fromDart', '*');
|
| +}
|
| +
|
| +class A {
|
| + var d;
|
| +
|
| + A(this.d) {}
|
| +
|
| + toString() {
|
| + return "[Instance of A, d = $d]";
|
| + }
|
| +}
|
| +
|
| +var globalVariable = 'globalString';
|
| +
|
| +var globalMapVariable = {'foo': 'bar', 'baz': 42};
|
| +
|
| +var globalArrayVariable = [3, 1, 4, 1, 5, 9];
|
| +
|
| +String get throwingGetter {
|
| + throw 'only the best reviews';
|
| +}
|
| +
|
| +html.DivElement get exampleDivGetter => html.query("#example_div");
|
|
|