<!DOCTYPE html>
<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport">
<meta name="assert" content="text-size-adjust should affect font-size, even for large values.">
<link rel="help" href="https://drafts.csswg.org/css-size-adjust/#propdef-text-size-adjust">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script>
function runTest() {
// This should not be needed but is required to work around a bug in
// Chrome's old autosizer due to computed style being updated during layout.
// TODO(pdr): Remove this when b/340389272 launches.
const forceLayout = document.body.offsetHeight;
test(() => {
const fontSize = getComputedStyle(textAdjust2FontSize12)['font-size'];
assert_equals(fontSize, '24px');
}, 'Font-size on element with text-size-adjust: 200% and font-size 12px');
test(() => {
const fontSize = getComputedStyle(textAdjust2FontSize16)['font-size'];
assert_equals(fontSize, '32px');
}, 'Font-size on element with text-size-adjust: 200% and font-size 16px');
test(() => {
const fontSize = getComputedStyle(textAdjust2FontSize20)['font-size'];
assert_equals(fontSize, '40px');
}, 'Font-size on element with text-size-adjust: 200% and font-size 20px');
}
</script>
<body onload="runTest()" style="text-size-adjust: 200%;">
<div id="textAdjust2FontSize12" style="font-size: 12px;">Hello world</div>
<div id="textAdjust2FontSize16" style="font-size: 16px;">Hello world</div>
<div id="textAdjust2FontSize20" style="font-size: 20px;">Hello world</div>
</body>