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

Side by Side Diff: LayoutTests/inspector/styles/override-screen-size.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 3
4 <style type="text/css" media="screen"> 4 <style type="text/css" media="screen">
5 @media (max-device-width: 998px) and (max-device-height: 1199x) { 5 @media (max-device-width: 998px) and (max-device-height: 1199x) {
6 #main { background: red; } 6 #main { background: red; }
7 } 7 }
8 8
9 @media (max-device-width: 1000px) and (max-device-height: 1200px) { 9 @media (max-device-width: 1000px) and (max-device-height: 1200px) {
10 #main { background: green; } 10 #main { background: green; }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 function applyOverride(width, height, userCallback) 116 function applyOverride(width, height, userCallback)
117 { 117 {
118 function callback(error) 118 function callback(error)
119 { 119 {
120 if (error) 120 if (error)
121 InspectorTest.addResult("Override: " + width + "x" + height + " => ERROR"); 121 InspectorTest.addResult("Override: " + width + "x" + height + " => ERROR");
122 userCallback(); 122 userCallback();
123 } 123 }
124 124
125 var enabled = width != 0 || height != 0; 125 var enabled = width != 0 || height != 0;
126 PageAgent.setDeviceMetricsOverride(width, height, 1, true, callback); 126 PageAgent.setDeviceMetricsOverride(width, height, 1, false, true, callba ck);
127 overridesEnabled = enabled; 127 overridesEnabled = enabled;
128 } 128 }
129 129
130 function overrideAndDumpData(width, height, callback) 130 function overrideAndDumpData(width, height, callback)
131 { 131 {
132 function finalCallback() 132 function finalCallback()
133 { 133 {
134 InspectorTest.addResult("Main style:"); 134 InspectorTest.addResult("Main style:");
135 InspectorTest.dumpSelectedElementStyles(true, false, true); 135 InspectorTest.dumpSelectedElementStyles(true, false, true);
136 callback(); 136 callback();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 </head> 181 </head>
182 182
183 <body onload="runTest()"> 183 <body onload="runTest()">
184 <p> 184 <p>
185 Tests that screen dimension overrides affect media rules, body dimensions, and w indow.screen. 185 Tests that screen dimension overrides affect media rules, body dimensions, and w indow.screen.
186 </p> 186 </p>
187 187
188 <div id="main"></div> 188 <div id="main"></div>
189 </body> 189 </body>
190 </html> 190 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/styles/override-and-disable.html ('k') | LayoutTests/inspector/text-autosizing-override.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698