| Index: tests/html/document_test.dart
|
| diff --git a/tests/html/document_test.dart b/tests/html/document_test.dart
|
| index 2a543e751e63faaa64ebcd8bf2b6961a4a1b5a13..355a126e85a5939b927f1b65b4c64e91778b2653 100644
|
| --- a/tests/html/document_test.dart
|
| +++ b/tests/html/document_test.dart
|
| @@ -13,6 +13,8 @@ main() {
|
| var isUnknownElement =
|
| predicate((x) => x is UnknownElement, 'is UnknownElement');
|
|
|
| + var inscrutable;
|
| +
|
| test('CreateElement', () {
|
| // FIXME: nifty way crashes, do it boring way.
|
| expect(new Element.tag('span'), isElement);
|
| @@ -42,6 +44,8 @@ main() {
|
| });
|
|
|
| group('document', () {
|
| + inscrutable = (x) => x;
|
| +
|
| test('Document.query', () {
|
| Document doc = new DomParser().parseFromString(
|
| '''<ResultSet>
|
| @@ -80,5 +84,23 @@ main() {
|
| doc.body.nodes.add(div2);
|
| expect(doc.query('#foo').text, 'bar');
|
| });
|
| +
|
| + test('typeTest1', () {
|
| + inscrutable = inscrutable(inscrutable);
|
| + var doc1 = document;
|
| + expect(doc1 is HtmlDocument, true);
|
| + expect(inscrutable(doc1) is HtmlDocument, true);
|
| + var doc2 = document.implementation.createHtmlDocument('');
|
| + expect(doc2 is HtmlDocument, true);
|
| + expect(inscrutable(doc2) is HtmlDocument, true);
|
| + });
|
| +
|
| + test('typeTest2', () {
|
| + inscrutable = inscrutable(inscrutable);
|
| + // XML document.
|
| + var doc3 = document.implementation.createDocument(null, 'report', null);
|
| + expect(doc3 is HtmlDocument, false);
|
| + expect(inscrutable(doc3) is HtmlDocument, false);
|
| + });
|
| });
|
| }
|
|
|