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

Unified Diff: tests/compiler/dart2js_native/static_methods_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/static_methods_test.dart
diff --git a/tests/compiler/dart2js_native/static_methods_test.dart b/tests/compiler/dart2js_native/static_methods_test.dart
index ac8c4b0d2c8e78cbbab369119a69a578ece97831..d8badecbf66ebf29bc40177e67d1782e1581fbd4 100644
--- a/tests/compiler/dart2js_native/static_methods_test.dart
+++ b/tests/compiler/dart2js_native/static_methods_test.dart
@@ -37,18 +37,21 @@ class AA {
static int proton(c) => _baryon(c);
}
-void setup() native r"""
-// This code is all inside 'setup' and so not accessible from the global scope.
+void setup() {
+ JS('', r"""
+(function(){
+ // This code is inside 'setup' and so not accessible from the global scope.
-function CC(){}
+ function CC(){}
-CC.foo = function(s) { return s.length; }
-CC.bar = function(f) { return f("Bye"); }
-CC.lepton = function(f) { return f("Lepton"); }
-CC.baryon = function(f) { return f("three quarks"); }
+ CC.foo = function(s) { return s.length; };
+ CC.bar = function(f) { return f("Bye"); };
+ CC.lepton = function(f) { return f("Lepton"); };
+ CC.baryon = function(f) { return f("three quarks"); };
-self.CC = CC;
-""";
+ self.CC = CC;
+})()""");
+}
main() {
nativeTesting();

Powered by Google App Engine
This is Rietveld 408576698