Index: tests/compiler/dart2js_native/fake_thing_2_test.dart |
diff --git a/tests/compiler/dart2js_native/fake_thing_2_test.dart b/tests/compiler/dart2js_native/fake_thing_2_test.dart |
index 157e08f5d2d55fdf0cf8d7628c8cb259259fb8b1..3ec92e022e213b9838dfea8e9a9785bdf3035df9 100644 |
--- a/tests/compiler/dart2js_native/fake_thing_2_test.dart |
+++ b/tests/compiler/dart2js_native/fake_thing_2_test.dart |
@@ -2,7 +2,8 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-import 'native_testing.dart'; |
+import "dart:_js_helper"; |
+import "package:expect/expect.dart"; |
// Test that native objects cannot accidentally or maliciously be mistaken for |
// Dart objects. |
@@ -26,20 +27,19 @@ make2 = function(){return {$isThing: true}}; |
function NT() {} |
NT.prototype.$isThing = true; |
make3 = function(){return new NT;}; |
- |
-self.nativeConstructor(NT); |
"""; |
+var inscrutable; |
main() { |
- nativeTesting(); |
setup(); |
+ inscrutable = (x) => x; |
var a = new Thing(); |
var b = make1(); |
var c = make2(); |
var d = make3(); |
- Expect.isTrue(confuse(a) is Thing); |
- Expect.isFalse(confuse(b) is Thing); |
- Expect.isFalse(confuse(c) is Thing); |
- Expect.isFalse(confuse(d) is Thing); |
+ Expect.isTrue(inscrutable(a) is Thing); |
+ Expect.isFalse(inscrutable(b) is Thing); |
+ Expect.isFalse(inscrutable(c) is Thing); |
+ Expect.isFalse(inscrutable(d) is Thing); |
} |