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

Side by Side Diff: LayoutTests/inspector/styles/override-and-disable.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
« no previous file with comments | « no previous file | LayoutTests/inspector/styles/override-screen-size.html » ('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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 function applyOverride(width, height, userCallback) 99 function applyOverride(width, height, userCallback)
100 { 100 {
101 function callback(error) 101 function callback(error)
102 { 102 {
103 if (error) 103 if (error)
104 InspectorTest.addResult("Override: " + width + "x" + height + " => ERROR"); 104 InspectorTest.addResult("Override: " + width + "x" + height + " => ERROR");
105 userCallback(); 105 userCallback();
106 } 106 }
107 107
108 var enabled = width > 0 && height > 0; 108 var enabled = width > 0 && height > 0;
109 PageAgent.setDeviceMetricsOverride(width, height, 1, true, callback); 109 PageAgent.setDeviceMetricsOverride(width, height, 1, false, true, callba ck);
110 overridesEnabled = enabled; 110 overridesEnabled = enabled;
111 } 111 }
112 112
113 function overrideAndDumpData(width, height, callback) 113 function overrideAndDumpData(width, height, callback)
114 { 114 {
115 function finalCallback() 115 function finalCallback()
116 { 116 {
117 InspectorTest.addResult("Main style:"); 117 InspectorTest.addResult("Main style:");
118 InspectorTest.dumpSelectedElementStyles(true, false, true); 118 InspectorTest.dumpSelectedElementStyles(true, false, true);
119 callback(); 119 callback();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 </head> 164 </head>
165 165
166 <body onload="runTest()"> 166 <body onload="runTest()">
167 <p> 167 <p>
168 Tests that disabling page agent cancels device metrics override. 168 Tests that disabling page agent cancels device metrics override.
169 </p> 169 </p>
170 170
171 <div id="main"></div> 171 <div id="main"></div>
172 </body> 172 </body>
173 </html> 173 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/styles/override-screen-size.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698