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 #near { | |
18 position: absolute; | |
19 left: 200px; | |
20 top: 200px; | |
21 width: 100px; | |
22 height: 100px; | |
23 background-color: red; | |
24 } | |
25 | |
26 #far { | |
27 position: absolute; | |
28 left: 200px; | |
29 top: 9000px; | |
30 width: 100px; | |
31 height: 100px; | |
32 background-color: green; | |
33 transform: translateZ(0px); /* force separate layer */ | |
34 } | |
35 </style> | |
36 | |
37 <script> | |
38 function test() | |
39 { | |
40 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.du
mpAsTextWithPixelResults();"} ); | |
41 | |
42 InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 9000,
"scale": 2.0 }, overrideActive); | |
43 | |
44 function overrideActive(msg) | |
45 { | |
46 // Complete the test without closing the inspector, so that the override
stays active for the picture. | |
47 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunne
r.notifyDone();"} ); | |
48 } | |
49 } | |
50 </script> | |
51 | |
52 </head> | |
53 <body onload="runTest()"> | |
54 <p> | |
55 Tests that a forced viewport repositions and scales an element on a separate lay
er that lies outside the normal painting area. | |
56 </p> | |
57 <div id="near"></div> | |
58 <div id="far"></div> | |
59 </body> | |
60 </html> | |
OLD | NEW |