Index: tests/html/events_test.dart |
diff --git a/tests/html/events_test.dart b/tests/html/events_test.dart |
index 11a962398cc28ba6e454b87871a98feb268ed075..a88d63196f48700ac9c601f1cd0026a40063da5e 100644 |
--- a/tests/html/events_test.dart |
+++ b/tests/html/events_test.dart |
@@ -29,27 +29,29 @@ main() { |
Event event = new Event('test'); |
invocationCounter = 0; |
- element.on['test'].dispatch(event); |
+ element.dispatchEvent(event); |
expect(invocationCounter, isZero); |
- element.on['test'].add(handler, false); |
+ var provider = new EventStreamProvider<CustomEvent>('test'); |
+ |
+ var sub = provider.forTarget(element).listen(handler); |
invocationCounter = 0; |
- element.on['test'].dispatch(event); |
+ element.dispatchEvent(event); |
expect(invocationCounter, 1); |
- element.on['test'].remove(handler, false); |
+ sub.cancel(); |
invocationCounter = 0; |
- element.on['test'].dispatch(event); |
+ element.dispatchEvent(event); |
expect(invocationCounter, isZero); |
- element.on['test'].add(handler, false); |
+ provider.forTarget(element).listen(handler); |
invocationCounter = 0; |
- element.on['test'].dispatch(event); |
+ element.dispatchEvent(event); |
expect(invocationCounter, 1); |
- element.on['test'].add(handler, false); |
+ provider.forTarget(element).listen(handler); |
invocationCounter = 0; |
- element.on['test'].dispatch(event); |
+ element.dispatchEvent(event); |
expect(invocationCounter, 1); |
}); |
test('InitMouseEvent', () { |