| Index: tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
|
| diff --git a/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart b/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
|
| index 90bb87faf3c25c372227e0f26c0692bf1e32f515..6e4a95cdd582c18d25285fda7652da2c3ad0ebfd 100644
|
| --- a/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
|
| +++ b/tests/compiler/dart2js_native/native_class_avoids_hidden_name_frog_test.dart
|
| @@ -27,22 +27,28 @@ class CC {
|
| makeA() native;
|
| makeB() native;
|
|
|
| -void setup1() native """
|
| -// Poison hidden native names 'BB' and 'CC' to prove the compiler didn't place
|
| -// anything on the hidden native class.
|
| -BB = null;
|
| -CC = null;
|
| -""";
|
| -
|
| -void setup2() native """
|
| -// This code is all inside 'setup' and so not accessible from the global scope.
|
| -function BB(){}
|
| -function CC(){}
|
| -makeA = function(){return new BB}; // AA is native "BB"
|
| -makeB = function(){return new CC}; // BB is native "CC"
|
| -self.nativeConstructor(BB);
|
| -self.nativeConstructor(CC);
|
| -""";
|
| +void setup1() {
|
| + JS('', r"""
|
| +(function(){
|
| + // Poison hidden native names 'BB' and 'CC' to prove the compiler didn't place
|
| + // anything on the hidden native class.
|
| + BB = null;
|
| + CC = null;
|
| +})()""");
|
| +}
|
| +
|
| +void setup2() {
|
| + JS('', r"""
|
| +(function(){
|
| + // This code is inside 'setup' and so not accessible from the global scope.
|
| + function BB(){}
|
| + function CC(){}
|
| + makeA = function(){return new BB()}; // AA is native "BB"
|
| + makeB = function(){return new CC()}; // BB is native "CC"
|
| + self.nativeConstructor(BB);
|
| + self.nativeConstructor(CC);
|
| +})()""");
|
| +}
|
|
|
| main() {
|
| nativeTesting();
|
|
|