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

Unified Diff: tests/html/element_test.dart

Issue 26557004: Fix for events not firing on sanitized elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/element_test.dart
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart
index 06b1e41ef05f06b238d1639003f92e53f1fd46db..bf6874a9f3917ea7df4718dc568e0ca6ea1cddd7 100644
--- a/tests/html/element_test.dart
+++ b/tests/html/element_test.dart
@@ -220,6 +220,16 @@ main() {
expect(node.parent, isNull);
expect(node.innerHtml, 'foobar');
});
+
+ test('.html can fire events', () {
+ var e = new Element.html('<button>aha</button>');
+ var gotEvent = false;
+ e.onClick.listen((_) {
+ gotEvent = true;
+ });
+ e.click();
+ expect(gotEvent, isTrue, reason: 'click should have raised click event');
+ });
});
group('eventListening', () {
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698