Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / elements-img-tooltip.html
blob0385d0effbc97b39f061745e9eb1dd5345835dc7
1 <html>
2 <head>
4 <script src="../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../http/tests/inspector/elements-test.js"></script>
6 <script>
8 var test = function()
11 var treeElement;
12 InspectorTest.nodeWithId("image", step1);
14 function step1(node)
16 InspectorTest.firstElementsTreeOutline()._loadDimensionsForNode(node, step2);
19 function step2(dimensions)
21 const EXPECTED_WIDTH = 215;
22 const EXPECTED_HEIGHT = 174;
24 if (!dimensions)
25 InspectorTest.addResult("FAILED, no dimensions on treeElement.");
26 else {
27 if (dimensions.offsetWidth === dimensions.naturalWidth && dimensions.offsetHeight == dimensions.naturalHeight
28 && dimensions.offsetWidth === EXPECTED_WIDTH && dimensions.offsetHeight === EXPECTED_HEIGHT)
29 InspectorTest.addResult("PASSED, image dimensions for tooltip: " + EXPECTED_WIDTH + "x" + EXPECTED_HEIGHT + ".");
30 else
31 InspectorTest.addResult("FAILED, image dimensions for tooltip: " + formatDimensions(dimensions) + " (should be " + EXPECTED_WIDTH + "x" + EXPECTED_HEIGHT + ").");
33 InspectorTest.completeTest();
36 function formatDimensions(dimensions)
38 return dimensions.offsetWidth + "x" + dimensions.offsetHeight + " (natural: " + dimensions.naturalWidth + "x" + dimensions.naturalHeight + ")";
42 </script>
43 </head>
45 <body onload="runTest()">
46 <p>
47 Tests the tooltip for the image on hover.
48 </p>
50 <img id="image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAACuCAIAAAAqMg/rAAAAAXNSR0IArs4c6QAAAU9JREFUeNrt0jERAAAIxDDAv+dHAxNLIqHXTlLwaiTAheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSFEuBCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLoSDBZXqBFnkRyeqAAAAAElFTkSuQmCC"/>
52 </body>
53 </html>