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

Unified Diff: pkg/analyzer/test/src/task/html_test.dart

Issue 1516073002: Parse HTML files with keeping original attributes case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/analyzer/lib/src/task/html.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/html_test.dart
diff --git a/pkg/analyzer/test/src/task/html_test.dart b/pkg/analyzer/test/src/task/html_test.dart
index acf10a0e0497d4837649079458ca9388972e3d88..c8f1f9778b775f9be0184d019fa6ef8172b15c8b 100644
--- a/pkg/analyzer/test/src/task/html_test.dart
+++ b/pkg/analyzer/test/src/task/html_test.dart
@@ -303,15 +303,22 @@ class ParseHtmlTaskTest extends AbstractContextTest {
<title>test page</title>
</head>
<body>
- <h1>Test</h1>
+ <h1 myAttr='my value'>Test</h1>
</body>
</html>
''';
AnalysisTarget target = newSource('/test.html', code);
computeResult(target, HTML_DOCUMENT);
expect(task, isParseHtmlTask);
- expect(outputs[HTML_DOCUMENT], isNotNull);
expect(outputs[HTML_DOCUMENT_ERRORS], isEmpty);
+ // HTML_DOCUMENT
+ {
+ Document document = outputs[HTML_DOCUMENT];
+ expect(document, isNotNull);
+ // verify that attributes are not lower-cased
+ Element element = document.body.getElementsByTagName('h1').single;
+ expect(element.attributes['myAttr'], 'my value');
+ }
// LINE_INFO
{
LineInfo lineInfo = outputs[LINE_INFO];
« no previous file with comments | « pkg/analyzer/lib/src/task/html.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698