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

Unified Diff: tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart

Issue 2383273002: Revert "Add native_testing library to mock @Native classes" (Closed)
Patch Set: Created 4 years, 3 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_rename_2_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
index 1d3cdcc1bd87eb4ae51443753a31e110e05f2aad..cb093cb6ae199e414483e8aceeff4e99784be2cc 100644
--- a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
@@ -6,7 +6,8 @@
// fields. However, native fields keep their name. The implication: a getter
// for the field must be based on the field's name, not the field's jsname.
-import 'native_testing.dart';
+import "package:expect/expect.dart";
+import 'dart:_js_helper' show Native, JSName;
abstract class I {
int key;
@@ -46,15 +47,13 @@ X.prototype.key = function(){return 666;};
makeA = function(){return new A};
makeX = function(){return new X};
-
-self.nativeConstructor(A);
-self.nativeConstructor(X);
""";
testDynamic() {
- var a = confuse(makeA());
- var b = confuse(new B());
- var x = confuse(makeX());
+ var things = [makeA(), new B(), makeX()];
+ var a = things[0];
+ var b = things[1];
+ var x = things[2];
Expect.equals(111, a.key);
Expect.equals(222, b.key);
@@ -92,7 +91,6 @@ testTyped() {
}
main() {
- nativeTesting();
setup();
testTyped();

Powered by Google App Engine
This is Rietveld 408576698