blob: 4720e61f220888aa3fb5247cb905cf6fbc4a7866 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=800">
<style>
html { font-size: 16px; }
body { width: 800px; margin: 0; overflow-y: hidden; }
</style>
<script>
if (window.internals) {
window.internals.settings.setTextAutosizingEnabled(true);
window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
} else if (window.console && console.warn) {
console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
}
</script>
</head>
<body>
<div>
<div style="width: 240px">
This text should be autosized to 20px computed font-size as it is combined with the next and the last narrow siblings and the maximum width is 400px.
</div>
<div style="width: 320px">
This text should be autosized to 20px computed font-size as it is combined with the first and the last narrow siblings and the maximum width is 400px.
</div>
<div style="width: 560px">
This text should be autosized to 28px computed font-size as it is combined into a separate group from its two siblings since it's significantly wider.<br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
<div style="width: 400px">
This text should be autosized to 20px computed font-size as it is combined with the first and the second narrow siblings and the maximum width is 400px.<br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
</body>
</html>