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

Unified Diff: tests/compiler/dart2js_native/browser_compat_1_prepatched_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/browser_compat_1_prepatched_test.dart
diff --git a/tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart b/tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart
index 606d4b1a4cc6381fecd9b41b57afd9fe5ab9bdda..40662d84d50489c0f0367387bd63467b5ee2b295 100644
--- a/tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart
+++ b/tests/compiler/dart2js_native/browser_compat_1_prepatched_test.dart
@@ -2,7 +2,10 @@
// 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";
+//import 'dart:_foreign_helper' show JS;
+//import 'dart:_js_helper' show Creates, setNativeSubclassDispatchRecord;
// Test for dartNativeDispatchHooksTransformer, getTag hook.
@@ -39,10 +42,6 @@ makeT1A = function(){return new T1A;};
makeT1B = function(){return new T1CrazyB;};
makeT1C = function(){return new T1fakeA;};
-self.nativeConstructor(T1A);
-self.nativeConstructor(T1CrazyB);
-self.nativeConstructor(T1fakeA);
-
var getTagCount = 0;
getTagCallCount = function() { return getTagCount; }
@@ -70,9 +69,11 @@ function transformer1(hooks) {
dartNativeDispatchHooksTransformer = [transformer1];
''';
+var inscrutable;
+
main() {
- nativeTesting();
setup();
+ inscrutable = (x) => x;
var t1a = makeT1A();
var t1b = makeT1B();
@@ -84,9 +85,9 @@ main() {
Expect.equals(2, getTagCallCount());
- Expect.equals(true, confuse(t1a) is T1A, '$t1a is T1A');
- Expect.equals(true, confuse(t1b) is T1B, '$t1b is T1B');
- Expect.equals(true, confuse(t1c) is T1C, '$t1c is T1C');
+ Expect.equals(true, inscrutable(t1a) is T1A, '$t1a is T1A');
+ Expect.equals(true, inscrutable(t1b) is T1B, '$t1b is T1B');
+ Expect.equals(true, inscrutable(t1c) is T1C, '$t1c is T1C');
Expect.equals(2, getTagCallCount());
}

Powered by Google App Engine
This is Rietveld 408576698