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

Unified Diff: tests/compiler/dart2js_native/bound_closure_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
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_native/bound_closure_test.dart
diff --git a/tests/compiler/dart2js_native/bound_closure_test.dart b/tests/compiler/dart2js_native/bound_closure_test.dart
index 84d9145958d4c6a7fb329758ed18ab23a112a645..3509722ef336faa991d0b40bd1012d456de66469 100644
--- a/tests/compiler/dart2js_native/bound_closure_test.dart
+++ b/tests/compiler/dart2js_native/bound_closure_test.dart
@@ -27,24 +27,27 @@ makeBB() native;
makeCC() native;
inscrutable(a) native;
-void setup() native r"""
-function BB() {}
-BB.prototype.foo = function(u, v) {
- return 'BB.foo(' + u + ', ' + v + ')';
-};
-
-function CC() {}
-CC.prototype.foo = function(u, v) {
- return 'CC.foo(' + u + ', ' + v + ')';
-};
-
-makeBB = function(){return new BB;};
-makeCC = function(){return new CC;};
-inscrutable = function(a){return a;};
-
-self.nativeConstructor(BB);
-self.nativeConstructor(CC);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+ function BB() {}
+ BB.prototype.foo = function(u, v) {
+ return 'BB.foo(' + u + ', ' + v + ')';
+ };
+
+ function CC() {}
+ CC.prototype.foo = function(u, v) {
+ return 'CC.foo(' + u + ', ' + v + ')';
+ };
+
+ makeBB = function(){return new BB()};
+ makeCC = function(){return new CC()};
+ inscrutable = function(a){return a;};
+
+ self.nativeConstructor(BB);
+ self.nativeConstructor(CC);
+})()""");
+}
main() {
nativeTesting();
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698