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

Unified Diff: tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_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/native_class_avoids_hidden_name_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart b/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
index 90bb87faf3c25c372227e0f26c0692bf1e32f515..6e4a95cdd582c18d25285fda7652da2c3ad0ebfd 100644
--- a/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
@@ -27,22 +27,28 @@ class CC {
makeA() native;
makeB() native;
-void setup1() native """
-// Poison hidden native names 'BB' and 'CC' to prove the compiler didn't place
-// anything on the hidden native class.
-BB = null;
-CC = null;
-""";
-
-void setup2() native """
-// This code is all inside 'setup' and so not accessible from the global scope.
-function BB(){}
-function CC(){}
-makeA = function(){return new BB}; // AA is native "BB"
-makeB = function(){return new CC}; // BB is native "CC"
-self.nativeConstructor(BB);
-self.nativeConstructor(CC);
-""";
+void setup1() {
+ JS('', r"""
+(function(){
+ // Poison hidden native names 'BB' and 'CC' to prove the compiler didn't place
+ // anything on the hidden native class.
+ BB = null;
+ CC = null;
+})()""");
+}
+
+void setup2() {
+ JS('', r"""
+(function(){
+ // This code is inside 'setup' and so not accessible from the global scope.
+ function BB(){}
+ function CC(){}
+ makeA = function(){return new BB()}; // AA is native "BB"
+ makeB = function(){return new CC()}; // BB is native "CC"
+ self.nativeConstructor(BB);
+ self.nativeConstructor(CC);
+})()""");
+}
main() {
nativeTesting();

Powered by Google App Engine
This is Rietveld 408576698