14 border: solid
40px aqua;
16 background-color: blue;
20 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
21 <script src=
"../../../http/tests/inspector/elements-test.js"></script>
26 if (window
.eventSender
)
27 window
.eventSender
.zoomPageIn();
33 InspectorTest
.dumpInspectorHighlightJSON("svg-root", InspectorTest
.completeTest
.bind(InspectorTest
));
38 <body onload=
"startTest()">
39 <svg id=
"svg-root" width=
"100" height=
"200" viewbox=
"0 0 50 100"></svg>
40 <p id=
"description">This test verifies the position and size of the highlight rectangles overlayed on an SVG root element when the page is zoomed.
</p>
43 Expected value calculations for #svg-root's highlight rectangles at 120% zoom:
46 left: (10) * 1.2 == 12
48 width: (100 + 2 * (30 + 40 + 50)) * 1.2 == 340 * 1.2 == 408
49 height: (200 + 2 * (30 + 40 + 50)) * 1.2 == 440 * 1.2 == 528
52 left: (10 + 30) * 1.2 == 40 * 1.2 == 48
53 top: (20 + 30) * 1.2 == 50 * 1.2 == 60
54 width: (100 + 2 * (40 + 50)) * 1.2 == 280 * 1.2 == 336
55 height: (200 + 2 * (40 + 50)) * 1.2 == 380 * 1.2 == 456
58 left: (10 + 30 + 40) * 1.2 == 80 * 1.2 == 96
59 top: (20 + 30 + 40) * 1.2 == 90 * 1.2 == 108
60 width: (100 + 2 * (50)) * 1.2 == 200 * 1.2 == 240
61 height: (200 + 2 * (50)) * 1.2 == 300 * 1.2 == 360
64 left: (10 + 30 + 40 + 50) * 1.2 == 130 * 1.2 == 156
65 top: (20 + 30 + 40 + 50) * 1.2 == 140 * 1.2 == 168
66 width: (100) * 1.2 == 120
67 height: (200) * 1.2 == 240
70 <div id=
"console"></div>