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

Unified Diff: tests/compiler/dart2js_native/browser_compat_2_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/browser_compat_2_test.dart
diff --git a/tests/compiler/dart2js_native/browser_compat_2_test.dart b/tests/compiler/dart2js_native/browser_compat_2_test.dart
index 5917763222f9def1eed88454fed68a1ab557f292..aa8f1313b545393ae40c67a7621036aa6133ec2e 100644
--- a/tests/compiler/dart2js_native/browser_compat_2_test.dart
+++ b/tests/compiler/dart2js_native/browser_compat_2_test.dart
@@ -36,7 +36,9 @@ makeT1D() native;
int getTagCallCount() native;
void clearTagCallCount() native;
-void setup() native r'''
+void setup() {
+ JS('', r'''
+(function(){
function T1A() { this.v = "a"; }
function T1B() { this.v = "b"; }
function T1C() { this.v = "c"; }
@@ -51,16 +53,16 @@ T1C.prototype.__proto__ = T1A.prototype;
T1D.prototype.__proto__ = T1A.prototype;
// All classes share one implementation of native method 'foo'.
-T1A.prototype.foo = function() { return this.v + this.name(); }
-T1A.prototype.name = function() { return "A"; }
-T1B.prototype.name = function() { return "B"; }
-T1C.prototype.name = function() { return "C"; }
-T1D.prototype.name = function() { return "D"; }
+T1A.prototype.foo = function() { return this.v + this.name(); };
+T1A.prototype.name = function() { return "A"; };
+T1B.prototype.name = function() { return "B"; };
+T1C.prototype.name = function() { return "C"; };
+T1D.prototype.name = function() { return "D"; };
-makeT1A = function(){return new T1A;};
-makeT1B = function(){return new T1B;};
-makeT1C = function(){return new T1C;};
-makeT1D = function(){return new T1D;};
+makeT1A = function(){return new T1A()};
+makeT1B = function(){return new T1B()};
+makeT1C = function(){return new T1C()};
+makeT1D = function(){return new T1D()};
self.nativeConstructor(T1A);
self.nativeConstructor(T1B);
@@ -68,8 +70,8 @@ self.nativeConstructor(T1C);
self.nativeConstructor(T1D);
var getTagCount = 0;
-getTagCallCount = function() { return getTagCount; }
-clearTagCallCount = function() { getTagCount = 0; }
+getTagCallCount = function() { return getTagCount; };
+clearTagCallCount = function() { getTagCount = 0; };
function transformer1(hooks) {
var getTag = hooks.getTag;
@@ -101,7 +103,8 @@ function transformer2(hooks) {
}
dartNativeDispatchHooksTransformer = [transformer1, transformer2];
-''';
+})()''');
+}
main() {
nativeTesting();

Powered by Google App Engine
This is Rietveld 408576698