1 <style> 2 .noFloat:empty { float: none; } 3 .theadStyle:nth-last-child(odd) { display: table-header-group; float: right; } 4 .pSpanStyle { overflow: hidden; -webkit-appearance: button; } 5 .pSpanStyle:first-letter { text-align: -webkit-left; content: counter(section); } 6 </style> 7 <script> 8 var parentSpan = document.createElement('span'); 9 var childSpan = document.createElement('span'); 10 var thead = document.createElement('thead'); 11 var textNode = document.createTextNode('abc'); 12 13 function removeTextNode() { 14 childSpan.removeChild(textNode); 15 delete textNode; 16 if (window.layoutTestController) 17 layoutTestController.notifyDone(); 18 } 19 20 function changeClass() { 21 thead.setAttribute('class', 'noFloat'); 22 setTimeout("removeTable()", 10); 23 } 24 25 function removeTable() { 26 childSpan.removeChild(thead); 27 setTimeout('removeTextNode();', 10); 28 } 29 30 function runTest() { 31 parentSpan.setAttribute('class', 'pSpanStyle'); 32 document.documentElement.appendChild(parentSpan); 33 childSpan.setAttribute('class', 'noFloat'); 34 parentSpan.appendChild(childSpan); 35 thead.setAttribute('class', 'theadStyle'); 36 childSpan.appendChild(thead); 37 childSpan.appendChild(textNode); 38 setTimeout('changeClass();', 10); 39 40 if (window.layoutTestController) { 41 layoutTestController.waitUntilDone(); 42 layoutTestController.dumpAsText(); 43 } 44 } 45 window.onload = runTest; 46 </script> 47 PASS, if no exception or crash in debug 48