blob: 16434c98f75a0540b5b7dd32a17a3554a94eb897 [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; }
pre { margin: 0; }
</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>
<span style="white-space: pre">
This text is expected be autosized to 40px computed font-size (16 * 800/320), since Text Autosizing is not yet smart enough to detect that all the children of this div are unwrappable. Ideally it would not get autosized.
</span>
</div>
<div>
<span style="white-space: nowrap">
This text is expected be autosized to 40px computed font-size (16 * 800/320), since Text Autosizing is not yet smart enough to detect that all the children of this div are unwrappable. Ideally it would not get autosized.
</span>
</div>
<div>
<span style="white-space: pre-wrap">
This text should be autosized to 40px computed font-size (16 * 800/320) since it has white-space:pre-wrap which allows text wrapping (even though it doesn't collapse white space).
</span>
</div>
<div>
<span>
This text should be autosized to 40px computed font-size (16 * 800/320).
</span>
</div>
</body>
</html>