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

Unified Diff: tests/compiler/dart2js_native/field_type_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/field_type_test.dart
diff --git a/tests/compiler/dart2js_native/field_type_test.dart b/tests/compiler/dart2js_native/field_type_test.dart
index ebb83c66f106b8ed0eb22fb728a0af7fb63284c9..c9f4ec999d7006e7b245bdcb88d0610dbf9ff4ec 100644
--- a/tests/compiler/dart2js_native/field_type_test.dart
+++ b/tests/compiler/dart2js_native/field_type_test.dart
@@ -6,8 +6,7 @@
// This regression test verifies that compiler accounts for hidden constructor
// when analysing field values.
-import "dart:_js_helper";
-import "package:expect/expect.dart";
+import "native_testing.dart";
@Native("Node")
class Node {
@@ -48,9 +47,11 @@ void setup() native """
// This code is all inside 'setup' and so not accesible from the global scope.
function Node(parent){ this.parentNode = parent; }
makeNode = function(p){return new Node(p);};
+self.nativeConstructor(Node);
""";
main() {
+ nativeTesting();
setup();
var n1 = makeNode(null);
« no previous file with comments | « tests/compiler/dart2js_native/field_type2_test.dart ('k') | tests/compiler/dart2js_native/fixup_get_tag_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698