blob: ba53c0e71e3dc42a3066985446a00a43957266ed [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<table>
<tr id="parent">
<th id="header"></th>
</tr>
</table>
<script>
// Verifies that the text-align property on th elements may be set to 'start'
test(function() {
header.style.textAlign = 'start';
assert_equals(getComputedStyle(header).textAlign, 'start');
}, 'setting "text-align: start" on th element results in textAlign == "start"');
test(function() {
header.style.textAlign = 'inherit';
assert_equals(getComputedStyle(header).textAlign, 'start');
}, 'setting "text-align: inherit" on th element results in textAlign == "start"');
test(function() {
header.style.textAlign = 'initial';
assert_equals(getComputedStyle(header).textAlign, 'start');
}, 'setting "text-align: initial" on th element results in textAlign == "start"');
// Verifies that the text-align property set on th elements overrides the inherited value
test(function() {
document.getElementById('parent').style.textAlign = 'right';
header.style.textAlign = 'start';
assert_equals(getComputedStyle(header).textAlign, 'start');
}, 'setting text-align on th element overrides the inherited value');
</script>