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

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

Issue 2379173002: Add native_testing library to mock @Native classes (Closed)
Patch Set: xxx Created 4 years, 1 month 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/downcast_test.dart
diff --git a/tests/compiler/dart2js_native/downcast_test.dart b/tests/compiler/dart2js_native/downcast_test.dart
index f993388d1094b1a73a080d15c46a74dcf0a6b216..dab6ec8901439c9fc7234511cbb64bd3fb21817b 100644
--- a/tests/compiler/dart2js_native/downcast_test.dart
+++ b/tests/compiler/dart2js_native/downcast_test.dart
@@ -4,8 +4,7 @@
// Test for downcasts on native classes.
-import "dart:_js_helper";
-import "package:expect/expect.dart";
+import "native_testing.dart";
abstract class J {}
@@ -48,6 +47,9 @@ A.prototype.read = function() { return this._x; };
A.prototype.write = function(x) { this._x = x; };
makeA = function(){return new A};
makeB = function(){return new B};
+
+self.nativeConstructor(A);
+self.nativeConstructor(B);
""";
class C {}
@@ -55,6 +57,7 @@ class C {}
bool _check(a, b) => identical(a, b);
main() {
+ nativeTesting();
setup();
var a1 = makeA();

Powered by Google App Engine
This is Rietveld 408576698