| 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 b470495181cb5079587208341a119f84cc34f7d6..1d4aeb9e5e1ee9287dafa82f45ed371caf9515e7 100644
|
| --- a/tests/lib_strong/html/html_mock_test.dart
|
| +++ b/tests/lib_strong/html/html_mock_test.dart
|
| @@ -8,7 +8,11 @@ import 'dart:html';
|
| import 'package:expect/minitest.dart';
|
|
|
| class Mock {
|
| - noSuchMethod(Invocation i) => document;
|
| + noSuchMethod(Invocation i) {
|
| + if (this is Window) return document;
|
| + if (this is FileList) return new MockFile();
|
| + return null;
|
| + }
|
| }
|
|
|
| @proxy
|
| @@ -39,6 +43,12 @@ class MockLocation extends Mock implements Location {
|
| String href = "MOCK_HREF";
|
| }
|
|
|
| +@proxy
|
| +class MockFileList extends Mock implements FileList {}
|
| +
|
| +@proxy
|
| +class MockFile extends Mock implements File {}
|
| +
|
| main() {
|
| test('is', () {
|
| var win = new MockWindow();
|
| @@ -78,4 +88,9 @@ main() {
|
| HtmlDocument doc = new MockHtmlDocument();
|
| expect(doc.onBlur is Stream, isTrue, reason: 'onBlur should be a stream');
|
| });
|
| +
|
| + test('operator', () {
|
| + var fileList = new MockFileList();
|
| + expect(fileList[1] is File, isTrue);
|
| + });
|
| }
|
|
|