| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9b6daf88982a6992432240cb1632876f9a6ceb9f
|
| --- /dev/null
|
| +++ b/tests/lib_strong/html/html_mock_test.dart
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +import 'dart:html';
|
| +
|
| +import 'package:expect/minitest.dart';
|
| +
|
| +class Mock {
|
| + noSuchMethod(Invocation i) => document;
|
| +}
|
| +
|
| +@proxy
|
| +class MockWindow extends Mock implements Window {}
|
| +
|
| +main() {
|
| + test('is', () {
|
| + var win = new MockWindow();
|
| + expect(win is Window, isTrue);
|
| + });
|
| +
|
| + test('getter', () {
|
| + var win = new MockWindow();
|
| + expect(win.document, equals(document));
|
| + });
|
| +}
|
|
|