Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart

Issue 2990083002: dart2js_native tests: Migrate 'native STRING' to JS-calls - part 2/2 (Closed)
Patch Set: remove defunct comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « tests/compiler/dart2js_native/native_class_fields_test.dart ('k') | tests/compiler/dart2js_native/native_field_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698