| Index: tests/compiler/dart2js_native/native_use_native_name_in_table_frog_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_use_native_name_in_table_frog_test.dart b/tests/compiler/dart2js_native/native_use_native_name_in_table_frog_test.dart
|
| index d7d115055a91b15d744e4a8855b2c4d6a5c62eb6..0bd930aef63344ceda47eb064a0631f7917ebdc2 100644
|
| --- a/tests/compiler/dart2js_native/native_use_native_name_in_table_frog_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_use_native_name_in_table_frog_test.dart
|
| @@ -18,28 +18,31 @@ class B extends A {}
|
| A makeA() native;
|
| B makeB() native;
|
|
|
| -void 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;
|
| +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 NativeA() {}
|
| -function NativeB() {}
|
| -inherits(NativeB, NativeA);
|
| -NativeA.prototype.foo = function() { return 42; };
|
| + function NativeA() {}
|
| + function NativeB() {}
|
| + inherits(NativeB, NativeA);
|
| + NativeA.prototype.foo = function() { return 42; };
|
|
|
| -makeA = function(){return new NativeA;};
|
| -makeB = function(){return new NativeB;};
|
| + makeA = function(){return new NativeA()};
|
| + makeB = function(){return new NativeB()};
|
|
|
| -self.nativeConstructor(NativeA);
|
| -self.nativeConstructor(NativeB);
|
| -""";
|
| + self.nativeConstructor(NativeA);
|
| + self.nativeConstructor(NativeB);
|
| +})()""");
|
| +}
|
|
|
| main() {
|
| nativeTesting();
|
|
|