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

Unified Diff: tests/compiler/dart2js/jsinterop/world_test.dart

Issue 2852603003: Move JsInteropAnalysis.onQueueClosed to AnnotationProcessor.processJsInteropAnnotation (Closed)
Patch Set: Register anonymous classes correctly + add test Created 3 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/jsinterop/world_test.dart
diff --git a/tests/compiler/dart2js/jsinterop/world_test.dart b/tests/compiler/dart2js/jsinterop/world_test.dart
index 010fc4a613c1f6d2469d94cbfef2523b9af836bb..1618d07ef0fbb5b21dab57579b04ef4ee27f885d 100644
--- a/tests/compiler/dart2js/jsinterop/world_test.dart
+++ b/tests/compiler/dart2js/jsinterop/world_test.dart
@@ -34,7 +34,7 @@ class A {
external A(var foo);
}
-@JS()
+@JS('BClass')
class B {
get foo;
@@ -116,6 +116,27 @@ $mainSource
Expect.equals(E.superclass, Object_);
Expect.equals(F.superclass, Object_);
+ Expect.isFalse(backend.nativeData.isJsInteropClass(Object_));
+ Expect.isTrue(backend.nativeData.isJsInteropClass(A));
+ Expect.isTrue(backend.nativeData.isJsInteropClass(B));
+ Expect.isTrue(backend.nativeData.isJsInteropClass(C));
+ Expect.isTrue(backend.nativeData.isJsInteropClass(D));
+ Expect.isFalse(backend.nativeData.isJsInteropClass(E));
+ Expect.isFalse(backend.nativeData.isJsInteropClass(F));
+
+ Expect.isFalse(backend.nativeData.isAnonymousJsInteropClass(Object_));
+ Expect.isFalse(backend.nativeData.isAnonymousJsInteropClass(A));
+ Expect.isFalse(backend.nativeData.isAnonymousJsInteropClass(B));
+ Expect.isTrue(backend.nativeData.isAnonymousJsInteropClass(C));
+ Expect.isTrue(backend.nativeData.isAnonymousJsInteropClass(D));
+ Expect.isFalse(backend.nativeData.isAnonymousJsInteropClass(E));
+ Expect.isFalse(backend.nativeData.isAnonymousJsInteropClass(F));
+
+ Expect.equals('', backend.nativeData.getJsInteropClassName(A));
+ Expect.equals('BClass', backend.nativeData.getJsInteropClassName(B));
+ Expect.equals('', backend.nativeData.getJsInteropClassName(C));
+ Expect.equals('', backend.nativeData.getJsInteropClassName(D));
+
for (String name in classEnvironment.keys) {
ClassElement cls = classEnvironment[name];
bool isInstantiated = false;
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698