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

Unified Diff: tests/compiler/dart2js_native/native_field_name_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_field_name_test.dart
diff --git a/tests/compiler/dart2js_native/native_field_name_test.dart b/tests/compiler/dart2js_native/native_field_name_test.dart
index 506b555663975d638664abbb4b94a72d19c97ed4..66e25ac3d1fa0ef85fa778d581cdec6e02514652 100644
--- a/tests/compiler/dart2js_native/native_field_name_test.dart
+++ b/tests/compiler/dart2js_native/native_field_name_test.dart
@@ -17,32 +17,35 @@ class A {
// This code is inside the setup function, so the function names are not
// accessible, but the makeA variable is global through the magic of JS scoping.
// The contents of this are of course not analyzable by the compiler.
-void setup() native r"""
-function getter() {
- return ++this.getValue;
-}
+void setup() {
+ JS('', r"""
+(function(){
+ function getter() {
+ return ++this.getValue;
+ }
-function setter(x) {
- this.getValue += 10;
-}
+ function setter(x) {
+ this.getValue += 10;
+ }
-function A(){
- var a = Object.create(
- { constructor: A },
- { myLongPropertyName: { get: getter,
- set: setter,
- configurable: false,
- writeable: false
- }
- });
- a.getValue = 0;
- return a;
-}
+ function A(){
+ var a = Object.create(
+ { constructor: A },
+ { myLongPropertyName: { get: getter,
+ set: setter,
+ configurable: false,
+ writeable: false
+ }
+ });
+ a.getValue = 0;
+ return a;
+ }
-makeA = function(){return new A;};
+ makeA = function(){return new A()};
-self.nativeConstructor(A);
-""";
+ self.nativeConstructor(A);
+})()""");
+}
/*A*/ makeA() native;

Powered by Google App Engine
This is Rietveld 408576698