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

Unified Diff: tests/compiler/dart2js_native/field_type2_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_type2_test.dart
diff --git a/tests/compiler/dart2js_native/field_type2_test.dart b/tests/compiler/dart2js_native/field_type2_test.dart
index 31de6696c371a2b84d8d428a5347b988b7cfe9bf..e3f0693c1fa1d920071fa9978dc1443bf7a789ac 100644
--- a/tests/compiler/dart2js_native/field_type2_test.dart
+++ b/tests/compiler/dart2js_native/field_type2_test.dart
@@ -5,7 +5,7 @@
// Test that a closure call on a native field is recognized by the
// type inferrer.
-import 'dart:_js_helper';
+import 'native_testing.dart';
@Native("Node")
class Node {
@@ -18,9 +18,12 @@ 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 node = makeNode(null);
if (node.parentNode != null) {
« no previous file with comments | « tests/compiler/dart2js_native/fake_thing_2_test.dart ('k') | tests/compiler/dart2js_native/field_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698