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

Unified Diff: tests/compiler/dart2js_native/browser_compat_1_unpatched_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_unpatched_test.dart
diff --git a/tests/compiler/dart2js_native/browser_compat_1_unpatched_test.dart b/tests/compiler/dart2js_native/browser_compat_1_unpatched_test.dart
index f2ada1e9ce5597a2746808c379e2af4376d03883..5e494d45dcdf78f69d4fcc57d0bac4c6ffb26f39 100644
--- a/tests/compiler/dart2js_native/browser_compat_1_unpatched_test.dart
+++ b/tests/compiler/dart2js_native/browser_compat_1_unpatched_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.
// Same as browser_compat_1_prepatched_test but with prepatching disabled.
@@ -40,10 +43,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; }
@@ -73,9 +72,11 @@ function transformer1(hooks) {
dartNativeDispatchHooksTransformer = [transformer1];
''';
+var inscrutable;
+
main() {
- nativeTesting();
setup();
+ inscrutable = (x) => x;
var t1a = makeT1A();
var t1b = makeT1B();
@@ -87,9 +88,9 @@ main() {
Expect.equals(3, 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(3, getTagCallCount());
}

Powered by Google App Engine
This is Rietveld 408576698