| Index: tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart b/tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart
|
| index 057da43a7d8659f4cd5672109a1728f1b8b26e6e..6a2fff5c1ed3291f73e0ff590b7e948105b09a07 100644
|
| --- a/tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart
|
| @@ -35,27 +35,30 @@ class B extends A {
|
| A makeA() native;
|
| B makeB() native;
|
|
|
| -void setup() native r"""
|
| -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;
|
| +void 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;};
|
| + function A(){}
|
| + function B(){}
|
| + inherits(B, A);
|
| + makeA = function(){return new A()};
|
| + makeB = function(){return new B()};
|
|
|
| -self.nativeConstructor(A);
|
| -self.nativeConstructor(B);
|
| -""";
|
| + self.nativeConstructor(A);
|
| + self.nativeConstructor(B);
|
| +})()""");
|
| +}
|
|
|
| testBasicA_dynamic() {
|
| setup(); // Fresh constructors.
|
|
|