blob: c1189aa1ecf90dcd47fef6822c0e5893100c631f [file] [log] [blame]
<!DOCTYPE html>
<meta name="viewport" content="width=800">
body { margin: 0; overflow-y: hidden; color: #aaa; }
#ib { display: inline-block; width: 12em; }
#ib:hover { color: #99f; }
i { color: black; }
<script src="resources/autosizingTest.js"></script>
<div id="ib">(hover styled inline block)</div> (some text follows)<br><br>
This test requires text autosizing to be enabled. The test passes if the width
of the inline block does not increase when the user hovers over the content.
(additional text to trigger autosizing)
function runTest() {
var inlineBlock = document.querySelector("#ib");
var width1 = inlineBlock.clientWidth;
// Trigger hover styles.
eventSender.mouseMoveTo(50, 30);
var width2 = inlineBlock.clientWidth;
var pass = width1 == width2;
document.body.innerText = pass ? "PASS" : "FAIL";
if (window.testRunner && window.eventSender)