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

Unified Diff: pkg/third_party/html5lib/test/parser_feature_test.dart

Issue 158083002: introduce web_components pkg for consolidated polyfills (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/third_party/html5lib/test/dom_test.dart ('k') | pkg/unittest/lib/test_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/third_party/html5lib/test/parser_feature_test.dart
diff --git a/pkg/third_party/html5lib/test/parser_feature_test.dart b/pkg/third_party/html5lib/test/parser_feature_test.dart
index 32269c3240e8068160c5c55b82ede1d6c892d63c..055f024a42771731b654b0b860fceea8fec2eda6 100644
--- a/pkg/third_party/html5lib/test/parser_feature_test.dart
+++ b/pkg/third_party/html5lib/test/parser_feature_test.dart
@@ -93,7 +93,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('attribute spans', () {
var text = '<element name="x-foo" extends="x-bar" constructor="Foo">';
var doc = parse(text, generateSpans: true);
- var elem = doc.query('element');
+ var elem = doc.querySelector('element');
expect(elem.sourceSpan.start.offset, 0);
expect(elem.sourceSpan.end.offset, text.length);
expect(elem.sourceSpan.text, text);
@@ -108,7 +108,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('attribute value spans', () {
var text = '<element name="x-foo" extends="x-bar" constructor="Foo">';
var doc = parse(text, generateSpans: true);
- var elem = doc.query('element');
+ var elem = doc.querySelector('element');
expect(elem.attributeValueSpans['quux'], null);
@@ -120,7 +120,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('attribute spans if no attributes', () {
var text = '<element>';
var doc = parse(text, generateSpans: true);
- var elem = doc.query('element');
+ var elem = doc.querySelector('element');
expect(elem.attributeSpans['quux'], null);
expect(elem.attributeValueSpans['quux'], null);
@@ -129,7 +129,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('attribute spans if no attribute value', () {
var text = '<foo template>';
var doc = parse(text, generateSpans: true);
- var elem = doc.query('foo');
+ var elem = doc.querySelector('foo');
expect(elem.attributeSpans['template'].start.offset,
text.indexOf('template'));
@@ -139,7 +139,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('attribute spans null if code parsed without spans', () {
var text = '<element name="x-foo" extends="x-bar" constructor="Foo">';
var doc = parse(text);
- var elem = doc.query('element');
+ var elem = doc.querySelector('element');
expect(elem.sourceSpan, null);
expect(elem.attributeSpans['quux'], null);
expect(elem.attributeSpans['extends'], null);
@@ -174,9 +174,9 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
// However, we preserve the input order via LinkedHashMap
var doc = parseFragment('<foo d=1 a=2 c=3 b=4>');
expect(doc.outerHtml, '<foo d="1" a="2" c="3" b="4"></foo>');
- expect(doc.query('foo').attributes.remove('a'), '2');
+ expect(doc.querySelector('foo').attributes.remove('a'), '2');
expect(doc.outerHtml, '<foo d="1" c="3" b="4"></foo>');
- doc.query('foo').attributes['a'] = '0';
+ doc.querySelector('foo').attributes['a'] = '0';
expect(doc.outerHtml, '<foo d="1" c="3" b="4" a="0"></foo>');
});
@@ -206,11 +206,11 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
test('Newline after <pre>', () {
var doc = parseFragment('<pre>\n\nsome text</span>');
- expect(doc.query('pre').nodes[0].value, '\nsome text');
+ expect(doc.querySelector('pre').nodes[0].value, '\nsome text');
expect(doc.outerHtml, '<pre>\n\nsome text</pre>');
doc = parseFragment('<pre>\nsome text</span>');
- expect(doc.query('pre').nodes[0].value, 'some text');
+ expect(doc.querySelector('pre').nodes[0].value, 'some text');
expect(doc.outerHtml, '<pre>some text</pre>');
});
@@ -224,7 +224,7 @@ ParseError:4:3: Unexpected DOCTYPE. Ignored.
xlink:href="http://example.com/logo.png"
xlink:show="new"></desc>
''');
- var n = doc.query('desc');
+ var n = doc.querySelector('desc');
var keys = n.attributes.keys.toList();
expect(keys[0], new isInstanceOf<AttributeName>());
expect(keys[0].prefix, 'xlink');
« no previous file with comments | « pkg/third_party/html5lib/test/dom_test.dart ('k') | pkg/unittest/lib/test_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698