d1f780df0b
also gets the tests running Changes to scripts: * pkg/pkg.gyp: add 'third_party' to list of folders to search * tools/publish_pkg.py: update copyright year * tools/publish_all_pkgs.py: also include pkg/third_party Changes to html5lib: * pubspec.yaml -- removed versions * README.md -- removed some historical notes * added html5lib.status * test/browser -- rename browser_tests to browser_test so test framework finds it * test/parser_test.dart, test/parser_feature_test.dart -- moved dart:io test into parser_test so parser_feature_test can work in browser * test/support.dart -- now finds the data folder relative to entry point script * test/support.dart -- rename "pathos" import to "path" Not changed: * ./test/run.sh still works for testing, in addition to ./tools/test.dart R=dgrove@google.com, ricow@google.com, sigmund@google.com Review URL: https://codereview.chromium.org//22375011 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26152 260f80e4-7a28-3924-810f-c04153c831b5
35 lines
942 B
Dart
35 lines
942 B
Dart
/** Additional feature tests that aren't based on test data. */
|
|
library dom_test;
|
|
|
|
import 'package:unittest/unittest.dart';
|
|
import 'package:html5lib/parser.dart';
|
|
import 'package:html5lib/dom.dart';
|
|
|
|
main() {
|
|
group('Node.query type selectors', () {
|
|
test('x-foo', () {
|
|
expect(parse('<x-foo>').body.query('x-foo'), isNotNull);
|
|
});
|
|
|
|
test('-x-foo', () {
|
|
var doc = parse('<body><-x-foo>');
|
|
expect(doc.body.outerHtml, equals('<body><-x-foo></body>'));
|
|
expect(doc.body.query('-x-foo'), isNull);
|
|
});
|
|
|
|
test('foo123', () {
|
|
expect(parse('<foo123>').body.query('foo123'), isNotNull);
|
|
});
|
|
|
|
test('123 - invalid', () {
|
|
var doc = parse('<123>');
|
|
expect(() => doc.body.query('123'), throwsUnimplementedError);
|
|
});
|
|
|
|
test('x\\ny - not implemented', () {
|
|
var doc = parse('<x\\ny>');
|
|
expect(() => doc.body.query('x\\ny'), throwsUnimplementedError);
|
|
});
|
|
});
|
|
}
|