Index: LayoutTests/dart/inspector/evaluate-in-console.dart |
diff --git a/LayoutTests/dart/inspector/evaluate-in-console.dart b/LayoutTests/dart/inspector/evaluate-in-console.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c3cfaa30a0510098e20b734f901a3c1e552c484f |
--- /dev/null |
+++ b/LayoutTests/dart/inspector/evaluate-in-console.dart |
@@ -0,0 +1,55 @@ |
+import 'dart:collection'; |
+import 'dart:html'; |
+import 'dart:math' as math; |
+ |
+main() { |
+ window.onMessage.listen(handleMessage); |
+} |
+ |
+handleMessage(event) { |
+ if (event.data == 'fromJS') { |
+ Test test = new Test('Test.instanceField'); |
+ String _private = 'private'; |
+ window.postMessage('fromDart', '*'); |
+ } |
+} |
+ |
+class IntEntry extends LinkedListEntry<IntEntry> { |
+ final int value; |
+ |
+ IntEntry(this.value); |
+ |
+ String toString() => value.toString(); |
+} |
+ |
+LinkedList intList = new LinkedList() |
+ ..add(new IntEntry(4)) |
+ ..add(new IntEntry(2)); |
+ |
+class Base { |
+ int baseField = 0; |
+} |
+ |
+class Test extends Base { |
+ String instanceField; |
+ int _foo; |
+ |
+ Test(this.instanceField); |
+ |
+ get foo => _foo; |
+ set foo(int value) => _foo = value; |
+ |
+ Test create(String string) => new Test(string); |
+ |
+ String concat(Test x, Test y) { |
+ return '$instanceField:${x.instanceField}:${y.instanceField}'; |
+ } |
+ |
+ set baseField(value) {} |
+ |
+ String toString() => '<Test instance with instanceField = $instanceField>'; |
+} |
+ |
+String globalField; |
+ |
+int calculateSquareRoot(int x) => math.sqrt(x).toInt(); |