| Index: dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
|
| diff --git a/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart b/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
|
| index c6ae9c72e2fb75a87ab70f54ef856de338bb1dee..e14e590dc96e76e34bf60d735ab49d974b0b913c 100644
|
| --- a/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
|
| +++ b/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
|
| @@ -10,7 +10,8 @@ interface I {
|
| int key;
|
| }
|
|
|
| -class A implements I native "*A" {
|
| +@native("*A")
|
| +class A implements I {
|
| int key; // jsname is 'key'
|
| int getKey() => key;
|
| }
|
| @@ -21,17 +22,18 @@ class B implements I {
|
| int getKey() => key;
|
| }
|
|
|
| -class X native "*X" {
|
| - int native_key_method() native 'key';
|
| +@native("*X")
|
| +class X {
|
| + @native('key') int native_key_method();
|
| // This should cause B.key to be renamed, but not A.key.
|
| - int key() native 'key';
|
| + @native('key') int key();
|
| }
|
|
|
| -A makeA() native;
|
| -X makeX() native;
|
| +@native A makeA();
|
| +@native X makeX();
|
|
|
|
|
| -void setup() native """
|
| +@native("""
|
| // This code is all inside 'setup' and so not accesible from the global scope.
|
| function A(){ this.key = 111; }
|
| A.prototype.getKey = function(){return this.key;};
|
| @@ -41,7 +43,8 @@ X.prototype.key = function(){return 666;};
|
|
|
| makeA = function(){return new A};
|
| makeX = function(){return new X};
|
| -""";
|
| +""")
|
| +void setup();
|
|
|
| testDynamic() {
|
| var things = [makeA(), new B(), makeX()];
|
|
|