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

Unified Diff: tests/compiler/dart2js_native/native_library_same_name_used_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_library_same_name_used_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
index 684f235c95e0afadee1334e00310100af5bf778f..4909b7f51f1d01897e6f0781deaa2a76132c3a3a 100644
--- a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
@@ -9,15 +9,18 @@ library main;
import 'native_testing.dart';
import 'native_library_same_name_used_lib1.dart';
-void setup() native """
+void setup() {
+ JS('', r"""
+(function(){
// This code is all inside 'setup' and so not accessible from the global
// scope.
function I(){}
I.prototype.read = function() { return this._x; };
I.prototype.write = function(x) { this._x = x; };
- makeI = function(){return new I};
+ makeI = function(){return new I()};
self.nativeConstructor(I);
-""";
+})()""");
+}
// A pure Dart implementation of I.

Powered by Google App Engine
This is Rietveld 408576698