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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html

Issue 2657583002: Import wpt@cf62b859e6b890abc34f8140d185ba91df95c5b6 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 3 years, 11 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
Index: third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html b/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html
new file mode 100644
index 0000000000000000000000000000000000000000..33c43cd50c7a59abb46e0534cb47eea5963ad705
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>HTML Templates: In body insertion mode: A start tag whose tag name is html</title>
+<meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
+<meta name="assert" content="If HTML parser is in 'in body' insertion mode and meets HTML start tag, then for each attribute on the token, check to see if the attribute is already present on the top element of the stack of open elements. If it is not, add the attribute and its corresponding value to that element">
+<link rel="help" href="http://www.w3.org/TR/2013/WD-html-templates-20130214/#in-body-addition">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/resources/common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script type="text/javascript">
+
+// test <template><html class="htmlClass"></html></template><html id="htmlId" tabindex="5">
+// id attribute should be added to root <html> element
+// tabindex attribute should not be modified
+//class attribute should be ignored
+testInIFrame('/html/semantics/scripting-1/the-template-element/resources/html-start-tag.html', function(context) {
+ var doc = context.iframes[0].contentDocument;
+
+ var template = doc.body.querySelector('template');
+
+ var html = doc.documentElement;
+
+ assert_equals(html.getAttribute('tabindex'), '5', 'Attribute should be accessible');
+ assert_equals(html.getAttribute('id'), 'htmlId',
+ 'Attribute \'id\' should be added and accessible');
+ assert_false(html.hasAttribute('class'), 'Attribute \'class\' should be ignored');
+ assert_equals(template.content.childNodes.length, 0, 'Template should not contain HTML element');
+
+
+}, 'In body insertion mode: html start tag should add only absent attributes');
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698