Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: LayoutTests/fast/text-autosizing/resources/autosizingTest.js

Issue 720203002: Rename HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/frame/Settings.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function setWindowSizeOverride(width, height) { 1 function setWindowSizeOverride(width, height) {
2 if (window.internals) 2 if (window.internals)
3 window.internals.settings.setTextAutosizingWindowSizeOverride(width, hei ght); 3 window.internals.settings.setTextAutosizingWindowSizeOverride(width, hei ght);
4 } 4 }
5 5
6 function setFontScaleFactor(scale) { 6 function setFontScaleFactor(scale) {
7 if (window.internals) 7 if (window.internals)
8 window.internals.settings.setAccessibilityFontScaleFactor(scale); 8 window.internals.settings.setAccessibilityFontScaleFactor(scale);
9 } 9 }
10 10
11 function initAutosizingTest() { 11 function initAutosizingTest() {
12 if (window.internals) { 12 if (window.internals) {
13 window.internals.settings.setTextAutosizingEnabled(true); 13 window.internals.settings.setTextAutosizingEnabled(true);
14 setWindowSizeOverride(320, 480); 14 setWindowSizeOverride(320, 480);
15 } else if (window.console && console.warn) { 15 } else if (window.console && console.warn) {
16 console.warn("This test depends on Text Autosizing being enabled. Run wi th content shell" 16 console.warn("This test depends on Text Autosizing being enabled. Run wi th content shell"
17 + "and --dump-render-tree or manually enable Text Autosizing and either use a " 17 + "and --dump-render-tree or manually enable Text Autosizing and either use a "
18 + "mobile device with 320px device-width (like Nexus S or iPhone ), or define " 18 + "mobile device with 320px device-width (like Nexus S or iPhone ), or define "
19 + "HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP."); 19 + "DEBUG_TEXT_AUTOSIZING_ON_DESKTOP.");
20 } 20 }
21 } 21 }
22 22
23 // Automatically call init. Users who want a different window size can use setWi ndowSizeOverride. 23 // Automatically call init. Users who want a different window size can use setWi ndowSizeOverride.
24 initAutosizingTest(); 24 initAutosizingTest();
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/Settings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698