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

Unified Diff: third_party/WebKit/LayoutTests/fast/html/article-element.html

Issue 2674643002: Stop using script-tests in fast/html/. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/html/aside-element.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/html/article-element.html
diff --git a/third_party/WebKit/LayoutTests/fast/html/article-element.html b/third_party/WebKit/LayoutTests/fast/html/article-element.html
index d11216e491df50782ed449dc0bef8fd71c7de181..6e87d1caced66cebc4c0ec4da2087992a758dc20 100644
--- a/third_party/WebKit/LayoutTests/fast/html/article-element.html
+++ b/third_party/WebKit/LayoutTests/fast/html/article-element.html
@@ -4,6 +4,48 @@
<script src="../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/article-element.js"></script>
+<script>
+description('Various tests for the article element.');
+
+var testParent = document.createElement('div');
+document.body.appendChild(testParent);
+
+debug('&lt;article> closes &lt;p>:');
+testParent.innerHTML = '<p>Test that <article id="article1">an article element</article> closes &lt;p>.</p>';
+var article1 = document.getElementById('article1');
+shouldBeFalse('article1.parentNode.nodeName == "p"');
+
+debug('&lt;p> does not close &lt;article>:');
+testParent.innerHTML = '<article>Test that <p id="p1">a p element</p> does not close an article element.</article>';
+var p1 = document.getElementById('p1');
+shouldBe('p1.parentNode.nodeName', '"ARTICLE"');
+
+debug('&lt;article> can be nested inside &lt;article>:');
+testParent.innerHTML = '<article id="article2">Test that <article id="article3">an article element</article> can be nested inside another.</article>';
+var article3 = document.getElementById('article3');
+shouldBe('article3.parentNode.id', '"article2"');
+
+debug('Residual style:');
+testParent.innerHTML = '<b><article id="article4">This text should be bold.</article> <span id="span1">This is also bold.</span></b>';
+function getWeight(id) {
+ return document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue('font-weight');
+}
+shouldBe('getWeight("article4")', '"bold"');
+shouldBe('getWeight("span1")', '"bold"');
+document.body.removeChild(testParent);
+
+debug('FormatBlock:');
+var editable = document.createElement('div');
+editable.innerHTML = '[<span id="span2">The text will be a child of &lt;article>.</span>]';
+document.body.appendChild(editable);
+editable.contentEditable = true;
+var selection = window.getSelection();
+selection.selectAllChildren(editable);
+document.execCommand('FormatBlock', false, 'article');
+selection.removeAllRanges();
+shouldBe('document.getElementById("span2").parentNode.nodeName', '"ARTICLE"');
+document.body.removeChild(editable);
+
+</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/html/aside-element.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698