6 -webkit-box-sizing: border-box;
24 <pre id="console"></pre>
26 <div id="horizontal"></div>
27 <div id="vertical"></div>
29 <script type="text/javascript">
32 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
35 function resize(target)
37 var x = document.body.offsetLeft + target.offsetLeft + target.offsetWidth;
38 var y = document.body.offsetTop + target.offsetTop + target.offsetHeight;
39 eventSender.mouseMoveTo(x - 6, y - 6);
40 eventSender.mouseDown();
41 eventSender.mouseMoveTo(x + 44, y + 44);
42 eventSender.mouseUp();
45 function assertSize(target, width, height)
47 var computedStyle = getComputedStyle(target);
48 var actualWidth = computedStyle.width;
49 var actualHeight = computedStyle.height;
51 if (actualWidth === width && actualHeight === height)
52 log("'" + target.id + "' resized as expected to (" + width + ", " + height + ").");
54 log("FAIL: '" + target.id + "' resized to (" + actualWidth + ", " + actualHeight + ") instead of (" + width + ", " + height + ").");
57 if (window.layoutTestController) {
58 layoutTestController.dumpAsText();
60 var both = document.getElementById("both");
61 var horizontal = document.getElementById("horizontal");
62 var vertical = document.getElementById("vertical");
68 assertSize(both, "100px", "100px");
69 assertSize(horizontal, "100px", "50px");
70 assertSize(vertical, "50px", "100px");