<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
text {
baseline-shift: inherit;
}
</style>
<svg height="0"><text></text></svg>
<script>
setup(function() {
window.svg = document.querySelector('svg');
window.textElement = document.querySelector('text');
});
[
{value: 'baseline', expected: '0px'},
{value: 'sub'},
{value: 'super'},
{value: '10px'},
{value: '100%'}
].forEach(function(item) {
test(function() {
svg.style.setProperty('baseline-shift', item.value);
assert_equals(getComputedStyle(textElement).baselineShift, item.expected || item.value);
}, 'Inheritance of the baseline-shift property, ' + item.value + '.');
});
</script>