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

Unified Diff: test/src/common/polymer_descriptor_test.dart

Issue 1290643006: First cut at behaviors. This just implements the lifecycle methodsportion. We may get the rest for … (Closed) Base URL: git@github.com:dart-lang/polymer-dart.git@master
Patch Set: Created 5 years, 4 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: test/src/common/polymer_descriptor_test.dart
diff --git a/test/src/common/polymer_descriptor_test.dart b/test/src/common/polymer_descriptor_test.dart
index 7df44b0c7490f8d1568d4ed48129bcc7f699c499..032cdd4fcfdcedd37d5e8377cea00f182da5f0b1 100644
--- a/test/src/common/polymer_descriptor_test.dart
+++ b/test/src/common/polymer_descriptor_test.dart
@@ -57,11 +57,22 @@ main() async {
expect(descriptor['handleSomeEvent'] is JsFunction, isTrue);
expect(descriptor['myDoubleChanged'] is JsFunction, isTrue);
expect(descriptor['myNumsCombined'] is JsFunction, isTrue);
+
+ expect(descriptor['behaviors'], isNotNull);
+ expect(descriptor['behaviors'].length, 2);
+ expect(descriptor['behaviors'][0], context['Foo']['BehaviorOne']);
+ expect(descriptor['behaviors'][1], context['Foo']['BehaviorTwo']);
});
}
+@BehaviorProxy(const ['Foo', 'BehaviorOne'])
+class BehaviorOne {}
+
+@BehaviorProxy(const ['Foo', 'BehaviorTwo'])
+class BehaviorTwo {}
+
@jsProxyReflectable
-class Test {
+class Test extends Object with BehaviorOne, BehaviorTwo {
@property
String myString;
@Property(notify: true)

Powered by Google App Engine
This is Rietveld 408576698