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

Side by Side Diff: LayoutTests/inspector/text-autosizing-override.html

Issue 253843007: [DevTools] Clean up text autosizing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test Created 6 years, 7 months 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 | LayoutTests/inspector/text-autosizing-override-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <meta name="viewport" content="width=800"> 3 <meta name="viewport" content="width=800">
4 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src="../http/tests/inspector/inspector-test.js"></script>
5 <style> 5 <style>
6 html { font-size: 16px; } 6 html { font-size: 16px; }
7 body { width: 800px; margin: 0; overflow-y: hidden; } 7 body { width: 800px; margin: 0; overflow-y: hidden; }
8 </style> 8 </style>
9 <script> 9 <script>
10 if (window.internals) 10 if (window.internals)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 assertAutosizingResult(true, next); 65 assertAutosizingResult(true, next);
66 }); 66 });
67 }, 67 },
68 68
69 function checkNotAutosizedWithDeviceMetrics(next) { 69 function checkNotAutosizedWithDeviceMetrics(next) {
70 PageAgent.invoke_setDeviceMetricsOverride({width: 1920, height: 1200, de viceScaleFactor: 2, emulateViewport: false, fitWindow: true, textAutosizing: fal se}, function() { 70 PageAgent.invoke_setDeviceMetricsOverride({width: 1920, height: 1200, de viceScaleFactor: 2, emulateViewport: false, fitWindow: true, textAutosizing: fal se}, function() {
71 assertAutosizingResult(false, next); 71 assertAutosizingResult(false, next);
72 }); 72 });
73 }, 73 },
74 74
75 function checkAutosizedWithoutDeviceMetrics(next) {
76 PageAgent.invoke_setDeviceMetricsOverride({width: 0, height: 0, deviceSc aleFactor: 0, emulateViewport: false, fitWindow: false, textAutosizing: true}, f unction() {
77 assertAutosizingResult(true, next);
78 });
79 },
80
75 function checkNotAutosizedWithoutDeviceMetrics(next) { 81 function checkNotAutosizedWithoutDeviceMetrics(next) {
76 PageAgent.invoke_setDeviceMetricsOverride({width: 0, height: 0, deviceSc aleFactor: 0, emulateViewport: false, fitWindow: false, textAutosizing: true}, f unction() { 82 InspectorTest.evaluateInPage("forceAutosizing(false)", function() {
77 assertAutosizingResult(false, next); 83 PageAgent.invoke_setDeviceMetricsOverride({width: 0, height: 0, device ScaleFactor: 0, emulateViewport: false, fitWindow: false, textAutosizing: true}, function() {
84 assertAutosizingResult(false, next);
85 });
78 }); 86 });
79 }, 87 },
80 88
81 function checkAutosizedWhenDeviceMetricsOverrideSettings(next) { 89 function checkAutosizedWhenDeviceMetricsOverrideSettings(next) {
82 InspectorTest.evaluateInPage("forceAutosizing(false)", function() { 90 InspectorTest.evaluateInPage("forceAutosizing(false)", function() {
83 PageAgent.invoke_setDeviceMetricsOverride({width: 1920, height: 1200, deviceScaleFactor: 2, emulateViewport: false, fitWindow: true, textAutosizing: t rue}, function() { 91 PageAgent.invoke_setDeviceMetricsOverride({width: 1920, height: 1200, deviceScaleFactor: 2, emulateViewport: false, fitWindow: true, textAutosizing: t rue}, function() {
84 assertAutosizingResult(true, next); 92 assertAutosizingResult(true, next);
85 }); 93 });
86 }); 94 });
87 }, 95 },
88 96
89 function cleanup(next) { 97 function cleanup(next) {
90 InspectorTest.evaluateInPage("var el = document.getElementById('measure' ); el.parentNode.removeChild(el);", next); 98 InspectorTest.evaluateInPage("var el = document.getElementById('measure' ); el.parentNode.removeChild(el);", next);
91 } 99 }
92 ]); 100 ]);
93 } 101 }
94 </script> 102 </script>
95 </head> 103 </head>
96 <body onload="runTest()"> 104 <body onload="runTest()">
97 <div id="measure"> 105 <div id="measure">
98 This text should be autosized to 40px computed font-size (16 * 800/320).<br/> 106 This text should be autosized to 40px computed font-size (16 * 800/320).<br/>
99 FAIL IF THIS IS VISIBLE<br/> 107 FAIL IF THIS IS VISIBLE<br/>
100 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempo r incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nos trud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugia t nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 108 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempo r incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nos trud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugia t nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
101 </div> 109 </div>
102 </body> 110 </body>
103 </html> 111 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/text-autosizing-override-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698