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

Unified Diff: tests/compiler/dart2js_native/native_checked_arguments1_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_checked_arguments1_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_checked_arguments1_frog_test.dart b/tests/compiler/dart2js_native/native_checked_arguments1_frog_test.dart
index bc34cbdcc15c860a1f1f3aec1e094a5767a379c9..ef2d077dc1194db7b3c017ec73a3d04bb2e9c0af 100644
--- a/tests/compiler/dart2js_native/native_checked_arguments1_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_checked_arguments1_frog_test.dart
@@ -21,21 +21,24 @@ class B {
A makeA() native;
B makeB() native;
-void setup() native """
-function A() {}
-A.prototype.foo = function (x) { return x + 1; };
-A.prototype.cmp = function (x) { return 0; };
-
-function B() {}
-B.prototype.foo = function (x) { return x + 'ha!'; };
-B.prototype.cmp = function (x) { return 1; };
-
-makeA = function(){return new A;};
-makeB = function(){return new B;};
-
-self.nativeConstructor(A);
-self.nativeConstructor(B);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+ function A() {}
+ A.prototype.foo = function (x) { return x + 1; };
+ A.prototype.cmp = function (x) { return 0; };
+
+ function B() {}
+ B.prototype.foo = function (x) { return x + 'ha!'; };
+ B.prototype.cmp = function (x) { return 1; };
+
+ makeA = function(){return new A()};
+ makeB = function(){return new B()};
+
+ self.nativeConstructor(A);
+ self.nativeConstructor(B);
+})()""");
+}
expectThrows(action()) {
bool threw = false;

Powered by Google App Engine
This is Rietveld 408576698