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

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

Issue 2383273002: Revert "Add native_testing library to mock @Native classes" (Closed)
Patch Set: Created 4 years, 3 months 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/native_call_arity3_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_call_arity3_frog_test.dart b/tests/compiler/dart2js_native/native_call_arity3_frog_test.dart
index f333d81716aa1bec29a6cabc97fa788e1203f818..1b4048ec6c0fb1808a637e7b479b1b9884437ce3 100644
--- a/tests/compiler/dart2js_native/native_call_arity3_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_call_arity3_frog_test.dart
@@ -2,7 +2,8 @@
// 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 "native_testing.dart";
+import "dart:_js_helper";
+import "package:expect/expect.dart";
// Test similar to NativeCallArity1FrogTest, but with default values to
// parameters set to null. These parameters should be treated as if they
@@ -33,14 +34,12 @@ B.prototype.foo = function () { return arguments.length; };
makeA = function(){return new A;};
makeB = function(){return new B;};
-
-self.nativeConstructor(A);
-self.nativeConstructor(B);
""";
testDynamicContext() {
- var a = confuse(makeA());
- var b = confuse(makeB());
+ var things = [makeA(), makeB()];
+ var a = things[0];
+ var b = things[1];
Expect.throws(() => a.foo());
Expect.equals(1, a.foo(10));
@@ -79,7 +78,6 @@ testStaticContext() {
}
main() {
- nativeTesting();
setup();
testDynamicContext();
testStaticContext();

Powered by Google App Engine
This is Rietveld 408576698