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

Unified Diff: tests/compiler/dart2js_native/runtimetype_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/runtimetype_test.dart
diff --git a/tests/compiler/dart2js_native/runtimetype_test.dart b/tests/compiler/dart2js_native/runtimetype_test.dart
index 4667eca8d8808d984ee3f5faa516c30ea0e2914e..babdc1168d21092f7fb8b2b78f06f5e249be43cc 100644
--- a/tests/compiler/dart2js_native/runtimetype_test.dart
+++ b/tests/compiler/dart2js_native/runtimetype_test.dart
@@ -2,9 +2,7 @@
// 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 "package:expect/expect.dart";
-import "dart:_js_helper";
-import 'dart:_foreign_helper' show JS;
+import 'native_testing.dart';
// Test to see runtimeType works on native classes and does not use the native
// constructor name.
@@ -33,6 +31,9 @@ inherits(TAGY, TAGX);
makeA = function(){return new TAGX};
makeB = function(){return new TAGY};
+
+self.nativeConstructor(TAGX);
+self.nativeConstructor(TAGY);
""";
testDynamicContext() {
@@ -58,6 +59,7 @@ testStaticContext() {
}
main() {
+ nativeTesting();
setup();
testDynamicContext();
« no previous file with comments | « tests/compiler/dart2js_native/oddly_named_fields_test.dart ('k') | tests/compiler/dart2js_native/static_methods_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698