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

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

Issue 45363004: DevTools: explicitly control support for viewport meta tag so that desktop emulation was possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments addressed. Created 7 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 | Annotate | Revision Log
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 }, 54 },
55 55
56 function checkAutosizedWithPageAgent(next) { 56 function checkAutosizedWithPageAgent(next) {
57 InspectorTest.evaluateInPage("forceAutosizing(true)", function() { 57 InspectorTest.evaluateInPage("forceAutosizing(true)", function() {
58 PageAgent.enable(); 58 PageAgent.enable();
59 assertAutosizingResult(true, next); 59 assertAutosizingResult(true, next);
60 }); 60 });
61 }, 61 },
62 62
63 function checkAutosizedWithDeviceMetrics(next) { 63 function checkAutosizedWithDeviceMetrics(next) {
64 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, true, true, function() { 64 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, false, true, true, fun ction() {
65 assertAutosizingResult(true, next); 65 assertAutosizingResult(true, next);
66 }); 66 });
67 }, 67 },
68 68
69 function checkNotAutosizedWithDeviceMetrics(next) { 69 function checkNotAutosizedWithDeviceMetrics(next) {
70 PageAgent.setDeviceMetricsOverride(1920, 1200, 2, true, false, function( ) { 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 checkAutosizedWithoutDeviceMetrics(next) { 75 function checkAutosizedWithoutDeviceMetrics(next) {
76 PageAgent.setDeviceMetricsOverride(0, 0, 2, true, function() { 76 PageAgent.setDeviceMetricsOverride(0, 0, 2, false, false, true, function () {
77 assertAutosizingResult(true, next); 77 assertAutosizingResult(true, 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, true, true, function () { 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/styles/override-screen-size.html ('k') | Source/core/inspector/InspectorClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698