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

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

Issue 335943003: merge to trunk all changes from 36817 until 37378 under the packages: polymer, (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 6 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/polymer/test/entered_view_test.html ('k') | pkg/polymer/test/event_handlers_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/event_handlers_test.dart
===================================================================
--- pkg/polymer/test/event_handlers_test.dart (revision 37373)
+++ pkg/polymer/test/event_handlers_test.dart (working copy)
@@ -23,6 +23,14 @@
XTest.created() : super.created();
+ @override
+ parseDeclaration(elementElement) {
+ var template = fetchTemplate(elementElement);
+ if (template != null) {
+ lightFromTemplate(template);
+ }
+ }
+
ready() {
super.ready();
for (var i = 0; i < 10; i++) {
@@ -56,31 +64,31 @@
}
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');
});
}
}
« no previous file with comments | « pkg/polymer/test/entered_view_test.html ('k') | pkg/polymer/test/event_handlers_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698