OLD | NEW |
1 library parser_test; | 1 library parser_test; |
2 | 2 |
3 import 'dart:io'; | 3 import 'dart:io'; |
4 import 'package:unittest/unittest.dart'; | 4 import 'package:unittest/unittest.dart'; |
5 import 'package:unittest/vm_config.dart'; | 5 import 'package:unittest/vm_config.dart'; |
6 import 'package:html5lib/dom.dart'; | 6 import 'package:html5lib/dom.dart'; |
7 import 'package:html5lib/parser.dart'; | 7 import 'package:html5lib/parser.dart'; |
8 import 'package:html5lib/src/constants.dart'; | 8 import 'package:html5lib/src/constants.dart'; |
9 import 'package:html5lib/src/tokenizer.dart'; | 9 import 'package:html5lib/src/tokenizer.dart'; |
10 import 'package:html5lib/src/utils.dart'; | 10 import 'package:html5lib/src/utils.dart'; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 int index = 0; | 76 int index = 0; |
77 for (var testData in tests) { | 77 for (var testData in tests) { |
78 var input = testData['data']; | 78 var input = testData['data']; |
79 var errors = testData['errors']; | 79 var errors = testData['errors']; |
80 var innerHTML = testData['document-fragment']; | 80 var innerHTML = testData['document-fragment']; |
81 var expected = testData['document']; | 81 var expected = testData['document']; |
82 if (errors != null) { | 82 if (errors != null) { |
83 errors = errors.split("\n"); | 83 errors = errors.split("\n"); |
84 } | 84 } |
85 | 85 |
86 for (var treeCtor in treeTypes.getValues()) { | 86 for (var treeCtor in treeTypes.values) { |
87 for (var namespaceHTMLElements in const [false, true]) { | 87 for (var namespaceHTMLElements in const [false, true]) { |
88 test(input, () { | 88 test(input, () { |
89 runParserTest(testName, innerHTML, input, expected, errors, | 89 runParserTest(testName, innerHTML, input, expected, errors, |
90 treeCtor, namespaceHTMLElements); | 90 treeCtor, namespaceHTMLElements); |
91 }); | 91 }); |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 index++; | 95 index++; |
96 } | 96 } |
97 }); | 97 }); |
98 } | 98 } |
99 }); | 99 }); |
100 } | 100 } |
OLD | NEW |