Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text-autosizing / inline-block-em-width-hover.html
blobc1189aa1ecf90dcd47fef6822c0e5893100c631f
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta name="viewport" content="width=800">
5 <style>
7 body { margin: 0; overflow-y: hidden; color: #aaa; }
8 #ib { display: inline-block; width: 12em; }
9 #ib:hover { color: #99f; }
10 i { color: black; }
12 </style>
13 <script src="resources/autosizingTest.js"></script>
14 </head>
15 <body>
16 <div id="ib">(hover styled inline block)</div> (some text follows)<br><br>
17 <i>
18 This test requires text autosizing to be enabled. The test passes if the width
19 of the inline block does not increase when the user hovers over the content.
20 </i>
21 <br><br>
22 (additional text to trigger autosizing)
23 <script>
25 function runTest() {
26 var inlineBlock = document.querySelector("#ib");
27 var width1 = inlineBlock.clientWidth;
29 // Trigger hover styles.
30 eventSender.mouseMoveTo(50, 30);
32 var width2 = inlineBlock.clientWidth;
33 var pass = width1 == width2;
35 document.body.innerText = pass ? "PASS" : "FAIL";
36 testRunner.dumpAsText();
39 if (window.testRunner && window.eventSender)
40 runTest();
42 </script>
43 </body>
44 </html>