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

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

Issue 22375011: move html5lib code into dart svn repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: change location of html5lib to pkg/third_party/html5lib Created 7 years, 4 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
(Empty)
1 /** Additional feature tests that aren't based on test data. */
2 library dom_test;
3
4 import 'package:unittest/unittest.dart';
5 import 'package:html5lib/parser.dart';
6 import 'package:html5lib/dom.dart';
7
8 main() {
9 group('Node.query type selectors', () {
10 test('x-foo', () {
11 expect(parse('<x-foo>').body.query('x-foo'), isNotNull);
12 });
13
14 test('-x-foo', () {
15 var doc = parse('<body><-x-foo>');
16 expect(doc.body.outerHtml, equals('<body>&lt;-x-foo&gt;</body>'));
17 expect(doc.body.query('-x-foo'), isNull);
18 });
19
20 test('foo123', () {
21 expect(parse('<foo123>').body.query('foo123'), isNotNull);
22 });
23
24 test('123 - invalid', () {
25 var doc = parse('<123>');
26 expect(() => doc.body.query('123'), throwsUnimplementedError);
27 });
28
29 test('x\\ny - not implemented', () {
30 var doc = parse('<x\\ny>');
31 expect(() => doc.body.query('x\\ny'), throwsUnimplementedError);
32 });
33 });
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698