Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / resize-single-axis.html
blob9b8487ea8ebc59745fd4d910ceb7b81dde328482
1 <style>
2 div {
3 width: 50px;
4 height: 50px;
5 overflow: hidden;
6 -webkit-box-sizing: border-box;
7 border: solid;
8 margin: 10px;
11 #both {
12 resize: both;
15 #horizontal {
16 resize: horizontal;
19 #vertical {
20 resize: vertical;
22 </style>
24 <pre id="console"></pre>
25 <div id="both"></div>
26 <div id="horizontal"></div>
27 <div id="vertical"></div>
29 <script type="text/javascript">
30 function log(message)
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 + ").");
53 else
54 log("FAIL: '" + target.id + "' resized to (" + actualWidth + ", " + actualHeight + ") instead of (" + width + ", " + height + ").");
57 if (window.testRunner) {
58 testRunner.dumpAsText();
60 var both = document.getElementById("both");
61 var horizontal = document.getElementById("horizontal");
62 var vertical = document.getElementById("vertical");
64 resize(both);
65 resize(horizontal);
66 resize(vertical);
68 assertSize(both, "100px", "100px");
69 assertSize(horizontal, "100px", "50px");
70 assertSize(vertical, "50px", "100px");
72 </script>