| Index: tests/lib_strong/html/html_mock_test.dart
|
| diff --git a/tests/lib_strong/html/html_mock_test.dart b/tests/lib_strong/html/html_mock_test.dart
|
| index bdf88600e4cf9b80978e022bba80a78b63da8649..b470495181cb5079587208341a119f84cc34f7d6 100644
|
| --- a/tests/lib_strong/html/html_mock_test.dart
|
| +++ b/tests/lib_strong/html/html_mock_test.dart
|
| @@ -16,13 +16,19 @@ class MockBodyElement extends Mock implements BodyElement {
|
| Node append(Node e) => e;
|
| }
|
|
|
| +class _EventListeners {
|
| + Stream<Event> get onBlur => new Stream.fromIterable([]);
|
| +}
|
| +
|
| @proxy
|
| -class MockHtmlDocument extends Mock implements HtmlDocument {
|
| +class MockHtmlDocument extends Mock
|
| + with _EventListeners
|
| + implements HtmlDocument {
|
| BodyElement get body => new MockBodyElement();
|
| }
|
|
|
| @proxy
|
| -class MockWindow extends Mock implements Window {
|
| +class MockWindow extends Mock with _EventListeners implements Window {
|
| Stream<Event> get onBeforeUnload => new Stream.fromIterable([]);
|
|
|
| String name = "MOCK_NAME";
|
| @@ -65,4 +71,11 @@ main() {
|
| HtmlDocument doc = new MockHtmlDocument();
|
| expect(doc.body.append(null), equals(null));
|
| });
|
| +
|
| + test('mixin', () {
|
| + Window win = new MockWindow();
|
| + expect(win.onBlur is Stream, isTrue, reason: 'onBlur should be a stream');
|
| + HtmlDocument doc = new MockHtmlDocument();
|
| + expect(doc.onBlur is Stream, isTrue, reason: 'onBlur should be a stream');
|
| + });
|
| }
|
|
|