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

Unified Diff: tests/compiler/dart2js_native/field_type2_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_type2_test.dart
diff --git a/tests/compiler/dart2js_native/field_type2_test.dart b/tests/compiler/dart2js_native/field_type2_test.dart
index 1786951b886ee60d07ede0ae70ba2b43baf12f25..3bc2e108ed91e1afa8a587fd156772610df9c5c0 100644
--- a/tests/compiler/dart2js_native/field_type2_test.dart
+++ b/tests/compiler/dart2js_native/field_type2_test.dart
@@ -14,13 +14,16 @@ class Node {
makeNode(parent) native;
-void setup() native """
+void setup() {
+ JS('', r"""
+(function(){
// 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);
-""";
+})()""");
+}
main() {
nativeTesting();
« no previous file with comments | « tests/compiler/dart2js_native/downcast_test.dart ('k') | tests/compiler/dart2js_native/field_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698