| Index: third_party/WebKit/LayoutTests/fast/html/aside-element.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/html/aside-element.html b/third_party/WebKit/LayoutTests/fast/html/aside-element.html
|
| index 73d04b216fef4e897b679a03cf4bdd1fb0071de2..d621eade7704552204f3f290b993ee062d67bde4 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/html/aside-element.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/html/aside-element.html
|
| @@ -4,6 +4,48 @@
|
| <script src="../../resources/js-test.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/aside-element.js"></script>
|
| +<script>
|
| +description('Various tests for the aside element.');
|
| +
|
| +var testParent = document.createElement('div');
|
| +document.body.appendChild(testParent);
|
| +
|
| +debug('<aside> closes <p>:');
|
| +testParent.innerHTML = '<p>Test that <aside id="aside1">an aside element</aside> closes <p>.</p>';
|
| +var aside1 = document.getElementById('aside1');
|
| +shouldBeFalse('aside1.parentNode.nodeName == "p"');
|
| +
|
| +debug('<p> does not close <aside>:');
|
| +testParent.innerHTML = '<aside>Test that <p id="p1">a p element</p> does not close an aside element.</aside>';
|
| +var p1 = document.getElementById('p1');
|
| +shouldBe('p1.parentNode.nodeName', '"ASIDE"');
|
| +
|
| +debug('<aside> can be nested inside <aside>:');
|
| +testParent.innerHTML = '<aside id="aside2">Test that <aside id="aside3">an aside element</aside> can be nested inside another.</aside>';
|
| +var aside3 = document.getElementById('aside3');
|
| +shouldBe('aside3.parentNode.id', '"aside2"');
|
| +
|
| +debug('Residual style:');
|
| +testParent.innerHTML = '<b><aside id="aside4">This text should be bold.</aside> <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("aside4")', '"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 <aside>.</span>]';
|
| +document.body.appendChild(editable);
|
| +editable.contentEditable = true;
|
| +var selection = window.getSelection();
|
| +selection.selectAllChildren(editable);
|
| +document.execCommand('FormatBlock', false, 'aside');
|
| +selection.removeAllRanges();
|
| +shouldBe('document.getElementById("span2").parentNode.nodeName', '"ASIDE"');
|
| +document.body.removeChild(editable);
|
| +
|
| +</script>
|
| </body>
|
| </html>
|
|
|