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

Unified Diff: tests/compiler/dart2js_native/native_class_fields_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/native_class_fields_2_test.dart
diff --git a/tests/compiler/dart2js_native/native_class_fields_2_test.dart b/tests/compiler/dart2js_native/native_class_fields_2_test.dart
index 40bae42c20f5214bcc4a90daf1f8f3371e626578..3b3d26555bdba7ab31fdccb160b74de0413a8dab 100644
--- a/tests/compiler/dart2js_native/native_class_fields_2_test.dart
+++ b/tests/compiler/dart2js_native/native_class_fields_2_test.dart
@@ -14,26 +14,29 @@ class A {
int gettersCalled;
}
-void setup() native r"""
-function getter() {
- this.gettersCalled++;
- return 42;
-}
+void setup() {
+ JS('', r"""
+(function(){
+ function getter() {
+ this.gettersCalled++;
+ return 42;
+ }
-function A(){
- var a = Object.create(
- { constructor: A },
- { x: { get: getter, configurable: false, writeable: false },
- y: { get: getter, configurable: false, writeable: false },
- z: { get: getter, configurable: false, writeable: false }
- });
- a.gettersCalled = 0;
- return a;
-}
+ function A(){
+ var a = Object.create(
+ { constructor: A },
+ { x: { get: getter, configurable: false, writeable: false },
+ y: { get: getter, configurable: false, writeable: false },
+ z: { get: getter, configurable: false, writeable: false }
+ });
+ a.gettersCalled = 0;
+ return a;
+ }
-makeA = function() { return new A; };
-self.nativeConstructor(A);
-""";
+ makeA = function() { return new A(); };
+ self.nativeConstructor(A);
+})()""");
+}
A makeA() native;
« no previous file with comments | « tests/compiler/dart2js_native/jsobject_test.dart ('k') | tests/compiler/dart2js_native/native_class_fields_3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698