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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script src="script-tests/article-element.js"></script> 7 <script>
8 description('Various tests for the article element.');
9
10 var testParent = document.createElement('div');
11 document.body.appendChild(testParent);
12
13 debug('&lt;article> closes &lt;p>:');
14 testParent.innerHTML = '<p>Test that <article id="article1">an article element</ article> closes &lt;p>.</p>';
15 var article1 = document.getElementById('article1');
16 shouldBeFalse('article1.parentNode.nodeName == "p"');
17
18 debug('&lt;p> does not close &lt;article>:');
19 testParent.innerHTML = '<article>Test that <p id="p1">a p element</p> does not c lose an article element.</article>';
20 var p1 = document.getElementById('p1');
21 shouldBe('p1.parentNode.nodeName', '"ARTICLE"');
22
23 debug('&lt;article> can be nested inside &lt;article>:');
24 testParent.innerHTML = '<article id="article2">Test that <article id="article3"> an article element</article> can be nested inside another.</article>';
25 var article3 = document.getElementById('article3');
26 shouldBe('article3.parentNode.id', '"article2"');
27
28 debug('Residual style:');
29 testParent.innerHTML = '<b><article id="article4">This text should be bold.</art icle> <span id="span1">This is also bold.</span></b>';
30 function getWeight(id) {
31 return document.defaultView.getComputedStyle(document.getElementById(id), nu ll).getPropertyValue('font-weight');
32 }
33 shouldBe('getWeight("article4")', '"bold"');
34 shouldBe('getWeight("span1")', '"bold"');
35 document.body.removeChild(testParent);
36
37 debug('FormatBlock:');
38 var editable = document.createElement('div');
39 editable.innerHTML = '[<span id="span2">The text will be a child of &lt;article> .</span>]';
40 document.body.appendChild(editable);
41 editable.contentEditable = true;
42 var selection = window.getSelection();
43 selection.selectAllChildren(editable);
44 document.execCommand('FormatBlock', false, 'article');
45 selection.removeAllRanges();
46 shouldBe('document.getElementById("span2").parentNode.nodeName', '"ARTICLE"');
47 document.body.removeChild(editable);
48
49 </script>
8 </body> 50 </body>
9 </html> 51 </html>
OLDNEW
« 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