| Index: tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
|
| index c8bed68c8a28f423dca7dafcde796ebf4d72e03f..5fd66023d9ad92faee548b38e1b49ce4a17447e1 100644
|
| --- a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
|
| @@ -33,20 +33,23 @@ class X {
|
| A makeA() native;
|
| X makeX() native;
|
|
|
| -void setup() native """
|
| -// This code is all inside 'setup' and so not accessible from the global scope.
|
| -function A(){ this.key = 111; }
|
| -A.prototype.getKey = function(){return this.key;};
|
| -
|
| -function X(){}
|
| -X.prototype.key = function(){return 666;};
|
| -
|
| -makeA = function(){return new A};
|
| -makeX = function(){return new X};
|
| -
|
| -self.nativeConstructor(A);
|
| -self.nativeConstructor(X);
|
| -""";
|
| +void setup() {
|
| + JS('', r"""
|
| +(function(){
|
| + // This code is inside 'setup' and so not accessible from the global scope.
|
| + function A(){ this.key = 111; }
|
| + A.prototype.getKey = function(){return this.key;};
|
| +
|
| + function X(){}
|
| + X.prototype.key = function(){return 666;};
|
| +
|
| + makeA = function(){return new A()};
|
| + makeX = function(){return new X()};
|
| +
|
| + self.nativeConstructor(A);
|
| + self.nativeConstructor(X);
|
| +})()""");
|
| +}
|
|
|
| testDynamic() {
|
| var a = confuse(makeA());
|
|
|