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

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

Issue 205403004: [DevTools] Allow overriding only the device scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase, one test fixed Created 6 years, 9 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 }); 66 });
67 }, 67 },
68 68
69 function checkNotAutosizedWithDeviceMetrics(next) { 69 function checkNotAutosizedWithDeviceMetrics(next) {
70 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, false, true, false, fu nction() { 70 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, false, true, false, fu nction() {
71 assertAutosizingResult(false, next); 71 assertAutosizingResult(false, next);
72 }); 72 });
73 }, 73 },
74 74
75 function checkNotAutosizedWithoutDeviceMetrics(next) { 75 function checkNotAutosizedWithoutDeviceMetrics(next) {
76 PageAgent.setDeviceMetricsOverride(0, 0, 2, false, false, true, function () { 76 PageAgent.setDeviceMetricsOverride(0, 0, 0, false, false, true, function () {
77 assertAutosizingResult(false, next); 77 assertAutosizingResult(false, next);
78 }); 78 });
79 }, 79 },
80 80
81 function checkAutosizedWhenDeviceMetricsOverrideSettings(next) { 81 function checkAutosizedWhenDeviceMetricsOverrideSettings(next) {
82 InspectorTest.evaluateInPage("forceAutosizing(false)", function() { 82 InspectorTest.evaluateInPage("forceAutosizing(false)", function() {
83 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, false, true, true, f unction() { 83 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, false, true, true, f unction() {
84 assertAutosizingResult(true, next); 84 assertAutosizingResult(true, next);
85 }); 85 });
86 }); 86 });
87 }, 87 },
88 88
89 function cleanup(next) { 89 function cleanup(next) {
90 InspectorTest.evaluateInPage("var el = document.getElementById('measure' ); el.parentNode.removeChild(el);", next); 90 InspectorTest.evaluateInPage("var el = document.getElementById('measure' ); el.parentNode.removeChild(el);", next);
91 } 91 }
92 ]); 92 ]);
93 } 93 }
94 </script> 94 </script>
95 </head> 95 </head>
96 <body onload="runTest()"> 96 <body onload="runTest()">
97 <div id="measure"> 97 <div id="measure">
98 This text should be autosized to 40px computed font-size (16 * 800/320).<br/> 98 This text should be autosized to 40px computed font-size (16 * 800/320).<br/>
99 FAIL IF THIS IS VISIBLE<br/> 99 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. 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.
101 </div> 101 </div>
102 </body> 102 </body>
103 </html> 103 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/device-emulation/device-emulation-test.js ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698