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

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

Issue 307793002: update polymer, nodebind, and templatebinding (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: roll Created 6 years, 7 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: pkg/polymer/test/event_handlers_test.dart
diff --git a/pkg/polymer/test/event_handlers_test.dart b/pkg/polymer/test/event_handlers_test.dart
index 203ea4e9a55f4b6dcd07154eb5fa6b8d2cc09524..40b7a53d1edd08e76893e1d376bb87d544c93c97 100644
--- a/pkg/polymer/test/event_handlers_test.dart
+++ b/pkg/polymer/test/event_handlers_test.dart
@@ -23,6 +23,14 @@ class XTest extends PolymerElement {
XTest.created() : super.created();
+ @override
+ parseDeclaration(elementElement) {
+ var template = fetchTemplate(elementElement);
+ if (template != null) {
+ lightFromTemplate(template);
Siggi Cherem (dart-lang) 2014/06/03 02:23:44 why is this needed?
Jennifer Messerly 2014/06/04 04:42:17 i updated the test. they changed it.
+ }
+ }
+
ready() {
super.ready();
for (var i = 0; i < 10; i++) {
@@ -56,31 +64,31 @@ class XTest extends PolymerElement {
}
Future _runTests() {
- fire('tap', toNode: $['div']);
+ fire('tap', onNode: $['div']);
expect(_testCount, 2, reason: 'event heard at div and host');
expect(_lastEvent, 'tap', reason: 'tap handled');
- fire('focus', toNode: $['input'], canBubble: false);
+ fire('focus', onNode: $['input'], canBubble: false);
expect(_testCount, 3, reason: 'event heard by input');
expect(_lastEvent, 'focus', reason: 'focus handled');
- fire('blur', toNode: $['input'], canBubble: false);
+ fire('blur', onNode: $['input'], canBubble: false);
expect(_testCount, 4, reason: 'event heard by input');
expect(_lastEvent, 'blur', reason: 'blur handled');
- fire('scroll', toNode: $['list'], canBubble: false);
+ fire('scroll', onNode: $['list'], canBubble: false);
expect(_testCount, 5, reason: 'event heard by list');
expect(_lastEvent, 'scroll', reason: 'scroll handled');
return onMutation($['list']).then((_) {
var l1 = $['list'].querySelectorAll('.list1')[4];
- fire('tap', toNode: l1, canBubble: false);
+ fire('tap', onNode: l1, canBubble: false);
expect(_testCount, 6, reason: 'event heard by list1 item');
expect(_lastEvent, 'tap', reason: 'tap handled');
expect(_lastMessage, 'x-test callback <mini-model 4>');
var l2 = $['list'].querySelectorAll('.list2')[3];
- fire('tap', toNode: l2, canBubble: false);
+ fire('tap', onNode: l2, canBubble: false);
expect(_testCount, 7, reason: 'event heard by list2 item');
expect(_lastEvent, 'tap', reason: 'tap handled by model');
- expect(_lastMessage, 'mini-model callback <mini-model 3>');
+ expect(_lastMessage, 'x-test callback x-test');
});
}
}

Powered by Google App Engine
This is Rietveld 408576698