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

Unified Diff: tests/compiler/dart2js_native/error_safeToString_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/error_safeToString_test.dart
diff --git a/tests/compiler/dart2js_native/error_safeToString_test.dart b/tests/compiler/dart2js_native/error_safeToString_test.dart
index 641c4869a52003a896a04fd4be280c114ac87621..5ee7c6803a30697f92d514e36be196c61849b9b1 100644
--- a/tests/compiler/dart2js_native/error_safeToString_test.dart
+++ b/tests/compiler/dart2js_native/error_safeToString_test.dart
@@ -33,46 +33,49 @@ makeP() native;
makeQ() native;
makeR() native;
-void setup() native r"""
-makeA = function(){return {hello: 123};};
-
-function BB(){}
-makeB = function(){return new BB();};
-
-function CC(){}
-makeC = function(){
- var x = new CC();
- x.constructor = null; // Foils constructor lookup.
- return x;
-};
-
-function DD(){}
-makeD = function(){
- var x = new DD();
- x.constructor = {name: 'DDxxx'}; // Foils constructor lookup.
- return x;
-};
-
-function EE(){}
-makeE = function(){
- var x = new EE();
- x.constructor = function Liar(){}; // Looks like a legitimate constructor.
- return x;
-};
-
-function PPPP(){}
-makeP = function(){return new PPPP();};
-
-function QQQQ(){}
-makeQ = function(){return new QQQQ();};
-
-function RRRR(){}
-makeR = function(){return new RRRR();};
-
-self.nativeConstructor(PPPP);
-self.nativeConstructor(QQQQ);
-self.nativeConstructor(RRRR);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+ makeA = function(){return {hello: 123};};
+
+ function BB(){}
+ makeB = function(){return new BB();};
+
+ function CC(){}
+ makeC = function(){
+ var x = new CC();
+ x.constructor = null; // Foils constructor lookup.
+ return x;
+ };
+
+ function DD(){}
+ makeD = function(){
+ var x = new DD();
+ x.constructor = {name: 'DDxxx'}; // Foils constructor lookup.
+ return x;
+ };
+
+ function EE(){}
+ makeE = function(){
+ var x = new EE();
+ x.constructor = function Liar(){}; // Looks like a legitimate constructor.
+ return x;
+ };
+
+ function PPPP(){}
+ makeP = function(){return new PPPP();};
+
+ function QQQQ(){}
+ makeQ = function(){return new QQQQ();};
+
+ function RRRR(){}
+ makeR = function(){return new RRRR();};
+
+ self.nativeConstructor(PPPP);
+ self.nativeConstructor(QQQQ);
+ self.nativeConstructor(RRRR);
+})()""");
+}
expectTypeName(expectedName, s) {
var m = new RegExp(r"Instance of '(.*)'").firstMatch(s);

Powered by Google App Engine
This is Rietveld 408576698