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

Unified Diff: tests/compiler/dart2js_native/field_type_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
Index: tests/compiler/dart2js_native/field_type_test.dart
diff --git a/tests/compiler/dart2js_native/field_type_test.dart b/tests/compiler/dart2js_native/field_type_test.dart
index 7f844e8cd10f2183e63e7a00eab80fb0507daee6..8e2e83d42f5aa31995ec21a998f7edbbe99a8dba 100644
--- a/tests/compiler/dart2js_native/field_type_test.dart
+++ b/tests/compiler/dart2js_native/field_type_test.dart
@@ -43,12 +43,15 @@ class ModelSource {
toString() => 'ModelSource($name)';
}
-void setup() native """
-// This code is all inside 'setup' and so not accessible from the global scope.
-function Node(parent){ this.parentNode = parent; }
-makeNode = function(p){return new Node(p);};
-self.nativeConstructor(Node);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+ // This code is inside 'setup' and so not accessible from the global scope.
+ function Node(parent){ this.parentNode = parent; }
+ makeNode = function(p){return new Node(p);};
+ self.nativeConstructor(Node);
+})()""");
+}
main() {
nativeTesting();
« no previous file with comments | « tests/compiler/dart2js_native/field_type2_test.dart ('k') | tests/compiler/dart2js_native/hash_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698