Index: tests/html/event_customevent_test.dart |
diff --git a/tests/html/event_customevent_test.dart b/tests/html/event_customevent_test.dart |
index 2f506278320d24164e962aee02077f7e18bd0708..4e0ed4860202ae5b1a6673146a71b3dec6ebbf4c 100644 |
--- a/tests/html/event_customevent_test.dart |
+++ b/tests/html/event_customevent_test.dart |
@@ -26,9 +26,19 @@ eventTest(String name, Event eventFn(), void validate(Event), |
main() { |
useHtmlConfiguration(); |
- eventTest('CustomEvent.initCustomEvent', () { |
- return new CustomEvent('foo', canBubble: false, cancelable: false, |
+ test('custom events', () { |
+ var provider = new EventStreamProvider<CustomEvent>('foo'); |
+ var el = new DivElement(); |
+ |
+ var fired = false; |
+ provider.forTarget(el).listen((ev) { |
+ fired = true; |
+ expect(ev.detail, 'detail'); |
+ }); |
+ |
+ var ev = new CustomEvent('foo', canBubble: false, cancelable: false, |
detail: 'detail'); |
- }, |
- (ev) { expect(ev.detail, equals('detail')); }); |
+ el.dispatchEvent(ev); |
+ expect(fired, isTrue); |
+ }); |
} |