1 function setWindowSizeOverride(width, height) {
3 window.internals.settings.setTextAutosizingWindowSizeOverride(width, height);
6 function setFontScaleFactor(scale) {
8 window.internals.settings.setAccessibilityFontScaleFactor(scale);
11 function initAutosizingTest() {
12 if (window.internals) {
13 window.internals.settings.setTextAutosizingEnabled(true);
14 setWindowSizeOverride(320, 480);
15 } else if (window.console && console.warn) {
16 console.warn("This test depends on Text Autosizing being enabled. Run with content shell "
17 + "and --run-layout-test or manually enable Text Autosizing and either use a "
18 + "mobile device with 320px device-width (like Nexus S or iPhone), or define "
19 + "DEBUG_TEXT_AUTOSIZING_ON_DESKTOP.");
23 // Automatically call init. Users who want a different window size can use setWindowSizeOverride.