Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / boundingBox.html
blobfe4a0d02afdc420824ba382626373b7b28edc11d
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner)
6 window.testRunner.dumpAsText()
8 function runTest()
10 var target = document.getElementById("target");
11 if (window.internals) {
12 var boundingBox = internals.boundingBox(target);
13 var boundingClientRect = target.getBoundingClientRect();
14 var rectsAreEqual = (boundingBox.width === boundingClientRect.width
15 && boundingBox.height === boundingClientRect.height
16 && boundingBox.left === boundingClientRect.left
17 && boundingBox.top === boundingClientRect.top);
19 document.getElementById("result").innerHTML = rectsAreEqual ? "PASS" : "FAIL: boundingBox: " + boundingBox.width + " x " + boundingBox.height + " @ (" + boundingBox.left + ", " + boundingBox.top + "), boundingClientRect: "
20 + boundingClientRect.width + " x " + boundingClientRect.height + " @ (" + boundingClientRect.left + ", " + boundingClientRect.top + ")";
23 </script>
24 </head>
25 <body onload="runTest()">
26 <div style="height: 200px;"></div>
27 <svg width=400 height=400>
28 <image width=200 height=200 x=50 y=50 id="target" />
29 </svg>
30 <p>
31 Test that -[DOMNode boundingBox] returns reasonable results for SVG elements.
32 </p>
33 <p id="result">This test can only be run in DumpRenderTree.</p>
34 </body>
35 </html>