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

Unified Diff: pkg/polymer/test/events_test.dart

Issue 79353003: [polymer.dart] fix *Changed observers inheriting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/polymer/test/event_handlers_test.html ('k') | pkg/polymer/test/events_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/events_test.dart
diff --git a/pkg/polymer/test/events_test.dart b/pkg/polymer/test/events_test.dart
index afd7e46787fc661897567b84f41f642b3c0b0168..f14cf4a189540c94275cb08adc2d3416a67921b2 100644
--- a/pkg/polymer/test/events_test.dart
+++ b/pkg/polymer/test/events_test.dart
@@ -29,6 +29,21 @@ class TestA extends PolymerElement {
}
}
+@reflectable
+class TestBase extends PolymerElement {
+ TestBase.created() : super.created();
+
+ List clicks = [];
+ void clickHandler(e) {
+ clicks.add('local click under $localName (id $id) on ${e.target.id}');
+ }
+}
+
+@CustomTag("test-c")
+class TestC extends TestBase {
+ TestC.created() : super.created();
+}
+
main() {
initPolymer();
useHtmlConfiguration();
@@ -56,4 +71,17 @@ main() {
b2.click();
expect(testB.clicks, ['local click under test-b (id b) on b-2']);
});
+
+ test('event on superclass', () {
+ var testC = query('#c');
+ expect(testC.clicks, isEmpty);
+ testC.click();
+ expect(testC.clicks, []);
+ var c1 = testC.shadowRoot.query('#c-1');
+ c1.click();
+ expect(testC.clicks, []);
+ var c2 = testC.shadowRoot.query('#c-2');
+ c2.click();
+ expect(testC.clicks, ['local click under test-c (id c) on c-2']);
+ });
}
« no previous file with comments | « pkg/polymer/test/event_handlers_test.html ('k') | pkg/polymer/test/events_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698