OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 | |
4 <script src="../../http/tests/inspector-protocol/resources/inspector-protocol-te
st.js"></script> | |
5 | |
6 <style> | |
7 html { | |
8 overflow: hidden; | |
9 } | |
10 | |
11 body { | |
12 margin: 0; | |
13 min-height: 1000px; | |
14 overflow: hidden; | |
15 } | |
16 | |
17 #long { | |
18 height: 2000px; | |
19 width: 100px; | |
20 background-color: green; | |
21 } | |
22 </style> | |
23 | |
24 <script> | |
25 function test() | |
26 { | |
27 InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 200, "
scale": 2.0 }, overrideActive); | |
28 | |
29 function overrideActive() | |
30 { | |
31 InspectorTest.log("innerWidth = " + window.innerWidth); | |
32 InspectorTest.log("innerHeight = " + window.innerHeight); | |
33 InspectorTest.log("scrollLeft = " + document.scrollingElement.scrollLeft
); | |
34 InspectorTest.log("scrollTop = " + document.scrollingElement.scrollTop); | |
35 InspectorTest.completeTest(); | |
36 } | |
37 } | |
38 </script> | |
39 | |
40 </head> | |
41 <body onload="runTest()"> | |
42 <p> | |
43 Tests that a forced viewport does not change metrics that are observable by the
page. | |
44 </p> | |
45 <div id="long"></div> | |
46 </body> | |
47 </html> | |
OLD | NEW |