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

Unified Diff: tests/compiler/dart2js_native/fixup_get_tag_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/fixup_get_tag_test.dart
diff --git a/tests/compiler/dart2js_native/fixup_get_tag_test.dart b/tests/compiler/dart2js_native/fixup_get_tag_test.dart
index 109edc11640e1248667dd9fa5e9056508bcbb0ab..e4e1ab8ec2e1f889b34847f3efd1e81944ead38a 100644
--- a/tests/compiler/dart2js_native/fixup_get_tag_test.dart
+++ b/tests/compiler/dart2js_native/fixup_get_tag_test.dart
@@ -12,30 +12,33 @@ class Foo {
token() native;
}
-void setup() native r"""
-
-dartExperimentalFixupGetTag = function (originalGetTag) {
- function fixedGetTag(obj) {
- // Local JS 'class' B is made to be another implementation of the native
- // class with tag 'A'.
- if (obj instanceof B) return 'A';
- // Other classes behave as before.
- return originalGetTag(obj);
- }
- return fixedGetTag;
-};
-
-function A(){ }
-A.prototype.token = function () { return 'isA'; }
-
-function B(){ }
-B.prototype.token = function () { return 'isB'; }
-
-makeA = function() { return new A; };
-makeB = function() { return new B; };
-
-self.nativeConstructor(A);
-""";
+void setup() {
+ JS('', r"""
+(function(){
+
+ dartExperimentalFixupGetTag = function (originalGetTag) {
+ function fixedGetTag(obj) {
+ // Local JS 'class' B is made to be another implementation of the native
+ // class with tag 'A'.
+ if (obj instanceof B) return 'A';
+ // Other classes behave as before.
+ return originalGetTag(obj);
+ }
+ return fixedGetTag;
+ };
+
+ function A(){ }
+ A.prototype.token = function () { return 'isA'; };
+
+ function B(){ }
+ B.prototype.token = function () { return 'isB'; };
+
+ makeA = function() { return new A(); };
+ makeB = function() { return new B(); };
+
+ self.nativeConstructor(A);
+})()""");
+}
makeA() native;
makeB() native;
« no previous file with comments | « tests/compiler/dart2js_native/fake_thing_test.dart ('k') | tests/compiler/dart2js_native/issue9182_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698