| Index: tests/compiler/dart2js_native/native_field_name_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_field_name_test.dart b/tests/compiler/dart2js_native/native_field_name_test.dart
|
| index 506b555663975d638664abbb4b94a72d19c97ed4..66e25ac3d1fa0ef85fa778d581cdec6e02514652 100644
|
| --- a/tests/compiler/dart2js_native/native_field_name_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_field_name_test.dart
|
| @@ -17,32 +17,35 @@ class A {
|
| // This code is inside the setup function, so the function names are not
|
| // accessible, but the makeA variable is global through the magic of JS scoping.
|
| // The contents of this are of course not analyzable by the compiler.
|
| -void setup() native r"""
|
| -function getter() {
|
| - return ++this.getValue;
|
| -}
|
| +void setup() {
|
| + JS('', r"""
|
| +(function(){
|
| + function getter() {
|
| + return ++this.getValue;
|
| + }
|
|
|
| -function setter(x) {
|
| - this.getValue += 10;
|
| -}
|
| + function setter(x) {
|
| + this.getValue += 10;
|
| + }
|
|
|
| -function A(){
|
| - var a = Object.create(
|
| - { constructor: A },
|
| - { myLongPropertyName: { get: getter,
|
| - set: setter,
|
| - configurable: false,
|
| - writeable: false
|
| - }
|
| - });
|
| - a.getValue = 0;
|
| - return a;
|
| -}
|
| + function A(){
|
| + var a = Object.create(
|
| + { constructor: A },
|
| + { myLongPropertyName: { get: getter,
|
| + set: setter,
|
| + configurable: false,
|
| + writeable: false
|
| + }
|
| + });
|
| + a.getValue = 0;
|
| + return a;
|
| + }
|
|
|
| -makeA = function(){return new A;};
|
| + makeA = function(){return new A()};
|
|
|
| -self.nativeConstructor(A);
|
| -""";
|
| + self.nativeConstructor(A);
|
| +})()""");
|
| +}
|
|
|
| /*A*/ makeA() native;
|
|
|
|
|