| Index: tests/compiler/dart2js_native/native_method_inlining_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_method_inlining_test.dart b/tests/compiler/dart2js_native/native_method_inlining_test.dart
|
| index 269f3a02330a715319d3a98ec9c45341d38db557..ac3be9598f3416b3d289d8a66954014fbcb0becc 100644
|
| --- a/tests/compiler/dart2js_native/native_method_inlining_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_method_inlining_test.dart
|
| @@ -53,26 +53,29 @@ A makeA() native;
|
|
|
| String findMethodTextContaining(instance, string) native;
|
|
|
| -void setup() native r"""
|
| -function A() {}
|
| -A.prototype.foo = function () { return arguments.length; };
|
| -A.prototype.callFun = function (fn) { return fn ? fn(123) : 1; };
|
| -
|
| -makeA = function(){return new A;};
|
| -
|
| -findMethodTextContaining = function (instance, string) {
|
| - var proto = Object.getPrototypeOf(instance);
|
| - var keys = Object.keys(proto);
|
| - for (var i = 0; i < keys.length; i++) {
|
| - var name = keys[i];
|
| - var member = proto[name];
|
| - var s = String(member);
|
| - if (s.indexOf(string)>0) return s;
|
| - }
|
| -};
|
| -
|
| -self.nativeConstructor(A);
|
| -""";
|
| +void setup() {
|
| + JS('', r"""
|
| +(function(){
|
| + function A() {}
|
| + A.prototype.foo = function () { return arguments.length; };
|
| + A.prototype.callFun = function (fn) { return fn ? fn(123) : 1; };
|
| +
|
| + makeA = function(){return new A()};
|
| +
|
| + findMethodTextContaining = function (instance, string) {
|
| + var proto = Object.getPrototypeOf(instance);
|
| + var keys = Object.keys(proto);
|
| + for (var i = 0; i < keys.length; i++) {
|
| + var name = keys[i];
|
| + var member = proto[name];
|
| + var s = String(member);
|
| + if (s.indexOf(string)>0) return s;
|
| + }
|
| + };
|
| +
|
| + self.nativeConstructor(A);
|
| +})()""");
|
| +}
|
|
|
| bool get isCheckedMode {
|
| int i = 0;
|
|
|