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

Side by Side Diff: third_party/WebKit/LayoutTests/html/grouping-content/figcaption-element.html

Issue 2780363002: Rename subdirectory names in LayoutTests/html/. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description('Various tests for the figcaption element.');
9
10 function getStyleValue(id, propertyName) {
11 return document.defaultView.getComputedStyle(document.getElementById(id), nu ll).getPropertyValue(propertyName);
12 }
13
14 var testParent = document.createElement('div');
15 document.body.appendChild(testParent);
16
17 debug('&lt;figcaption> default styling:');
18 testParent.innerHTML = '<figcaption id="figcaption0">element</figure>';
19 var emSize = getStyleValue("figcaption0","font-size");
20 shouldBe('getStyleValue("figcaption0","display")', '"block"');
21
22 debug('&lt;figcaption> closes &lt;p>:');
23 testParent.innerHTML = '<p>Test that <figcaption id="figcaption1">a figcaption e lement</figcaption> closes &lt;p>.</p>';
24 var figcaption1 = document.getElementById('figcaption1');
25 shouldBeFalse('figcaption1.parentNode.nodeName == "p"');
26
27 debug('&lt;p> does not close &lt;figcaption>:');
28 testParent.innerHTML = '<figcaption>Test that <p id="p1">a p element</p> does no t close a figcaption element.</figcaption>';
29 var p1 = document.getElementById('p1');
30 shouldBe('p1.parentNode.nodeName', '"FIGCAPTION"');
31
32 debug('&lt;figcaption> can be nested inside &lt;figcaption> or &lt;footer>:');
33 testParent.innerHTML = '<figcaption id="figcaption2">Test that <figcaption id="f igcaption3">a figcaption element</figcaption> can be nested inside another figca ption element.</figcaption>';
34 var figcaption3 = document.getElementById('figcaption3');
35 shouldBe('figcaption3.parentNode.id', '"figcaption2"');
36 testParent.innerHTML = '<footer id="footer1">Test that <figcaption id="figcaptio n5">a figcaption element</figcaption> can be nested inside a footer element.</fo oter>';
37 var figcaption5 = document.getElementById('figcaption5');
38 shouldBe('figcaption5.parentNode.id', '"footer1"');
39
40 debug('Residual style:');
41 testParent.innerHTML = '<b><figcaption id="figcaption4">This text should be bold .</figcaption> <span id="span1">This is also bold.</span></b>';
42 shouldBe('getStyleValue("figcaption4","font-weight")', '"bold"');
43 shouldBe('getStyleValue("span1","font-weight")', '"bold"');
44 document.body.removeChild(testParent);
45
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698