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 function nodeSelected(node)
35 InspectorTest.dumpInspectorHighlight(node, InspectorTest.completeTest.bind(InspectorTest));
38 InspectorTest.selectNodeWithId("svg-root", nodeSelected);
43 <body onload="startTest()">
44 <svg id="svg-root" width="100" height="200" viewbox="0 0 50 100"></svg>
45 <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>
48 Expected value calculations for #svg-root's highlight rectangles at 120% zoom:
51 left: (10) * 1.2 == 12
53 width: (100 + 2 * (30 + 40 + 50)) * 1.2 == 340 * 1.2 == 408
54 height: (200 + 2 * (30 + 40 + 50)) * 1.2 == 440 * 1.2 == 528
57 left: (10 + 30) * 1.2 == 40 * 1.2 == 48
58 top: (20 + 30) * 1.2 == 50 * 1.2 == 60
59 width: (100 + 2 * (40 + 50)) * 1.2 == 280 * 1.2 == 336
60 height: (200 + 2 * (40 + 50)) * 1.2 == 380 * 1.2 == 456
63 left: (10 + 30 + 40) * 1.2 == 80 * 1.2 == 96
64 top: (20 + 30 + 40) * 1.2 == 90 * 1.2 == 108
65 width: (100 + 2 * (50)) * 1.2 == 200 * 1.2 == 240
66 height: (200 + 2 * (50)) * 1.2 == 300 * 1.2 == 360
69 left: (10 + 30 + 40 + 50) * 1.2 == 130 * 1.2 == 156
70 top: (20 + 30 + 40 + 50) * 1.2 == 140 * 1.2 == 168
71 width: (100) * 1.2 == 120
72 height: (200) * 1.2 == 240
75 <div id="console"></div>