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

Unified Diff: tests/compiler/dart2js_native/dispatch_property_initialization_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/dispatch_property_initialization_test.dart
diff --git a/tests/compiler/dart2js_native/dispatch_property_initialization_test.dart b/tests/compiler/dart2js_native/dispatch_property_initialization_test.dart
index 174eaf872af3c32f171ca9e487a3d24649648b59..6da238e59455b596f63f0b3e66c465261094d958 100644
--- a/tests/compiler/dart2js_native/dispatch_property_initialization_test.dart
+++ b/tests/compiler/dart2js_native/dispatch_property_initialization_test.dart
@@ -4,9 +4,7 @@
// Test for initialization of dispatchPropertyName.
-import "package:expect/expect.dart";
-import 'dart:_foreign_helper' show JS;
-import 'dart:_js_helper' show Native;
+import 'native_testing.dart';
@Native("Foo")
class Foo {
@@ -20,10 +18,13 @@ function Foo() {}
Foo.prototype.method = function(x) { return 'Foo ' + x; }
self.makeFoo = function() { return new Foo(); }
+
+self.nativeConstructor(Foo);
""";
main() {
+ nativeTesting();
setup();
// If the dispatchPropertyName is uninitialized, it will be `undefined` or
« no previous file with comments | « tests/compiler/dart2js_native/dart2js_native.status ('k') | tests/compiler/dart2js_native/downcast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698