hr.html (1135B)
1 <!doctype html> 2 <title>The hr element</title> 3 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharnessreport.js></script> 5 <style> 6 #ref { 7 display: block; 8 unicode-bidi: isolate; 9 color: gray; 10 border-style: inset; 11 border-width: 1px; 12 margin: 0.5em auto; 13 /* TODO: uncomment this when these properties are widely supported 14 margin-block-start: 0.5em; 15 margin-inline-end: auto; 16 margin-block-end: 0.5em; 17 margin-inline-start: auto; 18 */ 19 overflow: hidden; 20 } 21 </style> 22 23 <hr id=test> 24 <div id=ref></div> 25 26 <script> 27 setup(() => { 28 self.testStyle = getComputedStyle(document.getElementById('test')); 29 self.refStyle = getComputedStyle(document.getElementById('ref')); 30 }); 31 ['display', 32 'unicodeBidi', 33 'color', 34 'borderTopStyle', 35 'borderRightStyle', 36 'borderBottomStyle', 37 'borderLeftStyle', 38 'borderTopWidth', 39 'borderRightWidth', 40 'borderBottomWidth', 41 'borderLeftWidth', 42 'marginTop', 43 'marginRight', 44 'marginBottom', 45 'marginLeft', 46 'overflow', 47 // Extra tests 48 'height', 49 'box-sizing', 50 ].forEach(prop => { 51 test(() => { 52 assert_equals(testStyle[prop], refStyle[prop]); 53 }, prop); 54 }); 55 </script>