Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(949)

Side by Side Diff: pkg/third_party/html5lib/test/dom_test.dart

Issue 157983005: pkg/third_party/html5lib: lots of cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: const Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** Additional feature tests that aren't based on test data. */ 1 /** Additional feature tests that aren't based on test data. */
2 library dom_test; 2 library dom_test;
3 3
4 import 'package:unittest/unittest.dart'; 4 import 'package:unittest/unittest.dart';
5 import 'package:html5lib/parser.dart'; 5 import 'package:html5lib/parser.dart';
6 import 'package:html5lib/dom.dart';
7 6
8 main() { 7 main() {
9 group('Node.query type selectors', () { 8 group('Node.query type selectors', () {
10 test('x-foo', () { 9 test('x-foo', () {
11 expect(parse('<x-foo>').body.query('x-foo'), isNotNull); 10 expect(parse('<x-foo>').body.query('x-foo'), isNotNull);
12 }); 11 });
13 12
14 test('-x-foo', () { 13 test('-x-foo', () {
15 var doc = parse('<body><-x-foo>'); 14 var doc = parse('<body><-x-foo>');
16 expect(doc.body.outerHtml, equals('<body>&lt;-x-foo&gt;</body>')); 15 expect(doc.body.outerHtml, equals('<body>&lt;-x-foo&gt;</body>'));
17 expect(doc.body.query('-x-foo'), isNull); 16 expect(doc.body.query('-x-foo'), isNull);
18 }); 17 });
19 18
20 test('foo123', () { 19 test('foo123', () {
21 expect(parse('<foo123>').body.query('foo123'), isNotNull); 20 expect(parse('<foo123>').body.query('foo123'), isNotNull);
22 }); 21 });
23 22
24 test('123 - invalid', () { 23 test('123 - invalid', () {
25 var doc = parse('<123>'); 24 var doc = parse('<123>');
26 expect(() => doc.body.query('123'), throwsUnimplementedError); 25 expect(() => doc.body.query('123'), throwsUnimplementedError);
27 }); 26 });
28 27
29 test('x\\ny - not implemented', () { 28 test('x\\ny - not implemented', () {
30 var doc = parse('<x\\ny>'); 29 var doc = parse('<x\\ny>');
31 expect(() => doc.body.query('x\\ny'), throwsUnimplementedError); 30 expect(() => doc.body.query('x\\ny'), throwsUnimplementedError);
32 }); 31 });
33 }); 32 });
34 } 33 }
OLDNEW
« no previous file with comments | « pkg/third_party/html5lib/test/dom_compat_test.dart ('k') | pkg/third_party/html5lib/test/parser_feature_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698