3 <style type=
"text/css" media=
"screen">
5 -webkit-column-count:
3;
6 -webkit-column-gap:
0px;
10 border: solid
1px red;
28 var res
= document
.getElementById('res');
29 res
.innerHTML
= res
.innerHTML
+ msg
+ "<br>";
32 function pageX(runner
) {
35 acc
+= runner
.offsetLeft
;
36 runner
= runner
.offsetParent
;
41 function pageY(runner
) {
44 acc
+= runner
.offsetTop
;
45 runner
= runner
.offsetParent
;
50 function testIt(formIndex
, colIndex
, ofsX
, expected
)
52 const form
= document
.getElementById("f" + formIndex
);
53 const column
= document
.getElementById("c" + formIndex
+ "0");
54 const colWidth
= Math
.floor(form
.offsetWidth
/ numCols
);
56 const sliderId
= "c" + formIndex
+ colIndex
;
57 const slider
= document
.getElementById(sliderId
);
59 const clickX
= pageX(column
) + colWidth
* colIndex
+ ofsX
;
60 const clickY
= pageY(column
) + slider
.offsetHeight
/ 2;
62 eventSender
.mouseMoveTo(clickX
, clickY
);
63 eventSender
.mouseDown();
64 eventSender
.mouseUp();
66 if (slider
.value
== expected
)
67 log("PASSED " + sliderId
);
69 log("FAILED " + sliderId
+ " expected=" + expected
+ " got=" + slider
.value
+ " " + clickX
+ "@" + clickY
);
74 if (!window
.testRunner
)
77 testRunner
.dumpAsText();
79 for (var formIndex
= 0; formIndex
< numForms
; formIndex
++) {
80 for (var colIndex
= 0; colIndex
< numCols
; colIndex
++) {
81 testIt(formIndex
, colIndex
, 23, 20);
87 <body onload=
"test()">
88 <h1>Slider In Multi-Coulumn
</h1>
89 This is test cases for
<a href=
"https://webkit.org/b/70898">BUG
70898</a>.
93 <input id=
"c00" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
94 <input id=
"c01" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
95 <input id=
"c02" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
101 <input id=
"c10" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
102 <input id=
"c11" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
103 <input id=
"c12" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
110 <input id=
"c20" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
111 <input id=
"c21" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
112 <input id=
"c22" type=
"range" min=
"0" max=
"100" step=
"10" /><br />
118 <table border=
"0" cellpadding=
"0" cellspacing=
"0">
119 <tr><td><input id=
"c30" type=
"range" min=
"0" max=
"100" step=
"10" /></td></tr>
120 <tr><td><input id=
"c31" type=
"range" min=
"0" max=
"100" step=
"10" /></td></tr>
121 <tr><td><input id=
"c32" type=
"range" min=
"0" max=
"100" step=
"10" /></td></tr>