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

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

Issue 2984403002: dart2js_native tests: Migrate 'native STRING' to JS-calls (Closed)
Patch Set: the rest of the files 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
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/core_type_check_native_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_native/abstract_class_test.dart
diff --git a/tests/compiler/dart2js_native/abstract_class_test.dart b/tests/compiler/dart2js_native/abstract_class_test.dart
index e9bfd402817e63e5b50d9597025d46feda2dcd62..6773385a4f925434f7d3baa23d18150f06c3d09e 100644
--- a/tests/compiler/dart2js_native/abstract_class_test.dart
+++ b/tests/compiler/dart2js_native/abstract_class_test.dart
@@ -21,16 +21,19 @@ class C {}
makeA() native;
makeB() native;
-void setup() native """
-// This code is all inside 'setup' and so not accessible from the global scope.
-function A(){}
-function B(){}
-B.prototype.foo = function() { return 'B.foo'; };
-makeA = function(){return new A};
-makeB = function(){return new B};
-self.nativeConstructor(A);
-self.nativeConstructor(B);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+ function A(){}
+ function B(){}
+ B.prototype.foo = function() { return 'B.foo'; };
+ makeA = function(){return new A()};
+ makeB = function(){return new B()};
+ self.nativeConstructor(A);
+ self.nativeConstructor(B);
+})()
+""");
+}
main() {
nativeTesting();
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/core_type_check_native_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698