| Index: tests/compiler/dart2js_native/native_no_such_method_exception2_frog_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_no_such_method_exception2_frog_test.dart b/tests/compiler/dart2js_native/native_no_such_method_exception2_frog_test.dart
|
| index 81bc26c92f85cd9939e0bc7b86dad37f75bda12a..5df3c124015a2a8b3a6a2cdfefda6294f256d24d 100644
|
| --- a/tests/compiler/dart2js_native/native_no_such_method_exception2_frog_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_no_such_method_exception2_frog_test.dart
|
| @@ -15,27 +15,30 @@ class B extends A {
|
| makeA() native;
|
| makeB() native;
|
|
|
| -setup() native """
|
| -function inherits(child, parent) {
|
| - if (child.prototype.__proto__) {
|
| - child.prototype.__proto__ = parent.prototype;
|
| - } else {
|
| - function tmp() {};
|
| - tmp.prototype = parent.prototype;
|
| - child.prototype = new tmp();
|
| - child.prototype.constructor = child;
|
| +setup() {
|
| + JS('', r"""
|
| +(function(){
|
| + function inherits(child, parent) {
|
| + if (child.prototype.__proto__) {
|
| + child.prototype.__proto__ = parent.prototype;
|
| + } else {
|
| + function tmp() {};
|
| + tmp.prototype = parent.prototype;
|
| + child.prototype = new tmp();
|
| + child.prototype.constructor = child;
|
| + }
|
| }
|
| + function A() {}
|
| + function B() {}
|
| + inherits(B, A);
|
| + makeA = function() { return new A() };
|
| + makeB = function() { return new B() };
|
| + B.prototype.foo = function() { return 42; };
|
| +
|
| + self.nativeConstructor(A);
|
| + self.nativeConstructor(B);
|
| +})()""");
|
| }
|
| - function A() {}
|
| - function B() {}
|
| - inherits(B, A);
|
| - makeA = function() { return new A; }
|
| - makeB = function() { return new B; }
|
| - B.prototype.foo = function() { return 42; }
|
| -
|
| - self.nativeConstructor(A);
|
| - self.nativeConstructor(B);
|
| -""";
|
|
|
| main() {
|
| nativeTesting();
|
|
|