caption-sibling-2-dyn.html (954B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <!-- dbaron thinks the validity of this test is questionable, see 5 https://bugzilla.mozilla.org/show_bug.cgi?id=477462#c20 and #c21 --> 6 <style type="text/css"> 7 #table { 8 display: table; 9 width: 100px; 10 } 11 #caption1 { 12 display: table-caption; 13 height: 20px; 14 background-color: red; 15 margin-bottom: 20px; 16 } 17 #caption2 { 18 display: table-caption; 19 height: 20px; 20 background-color: blue; 21 margin-top: 10px; 22 margin-bottom: 20px; 23 } 24 #caption3 { 25 display: table-caption; 26 height: 20px; 27 background-color: green; 28 margin-top: 10px; 29 } 30 </style> 31 <script type="text/javascript"> 32 function test() { 33 document.getElementById('caption2').style.display = 'none'; 34 document.documentElement.removeAttribute('class'); 35 } 36 document.addEventListener('MozReftestInvalidate', test); 37 </script> 38 </head> 39 <body> 40 <div id="table"> 41 <div id="caption1"></div> 42 <div id="caption2"></div> 43 <div id="caption3"></div> 44 </div> 45 </body> 46 </html>