2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css"
6 https://bugzilla.mozilla.org/show_bug.cgi?id=485118
8 <window title=
"Mozilla Bug 485118"
9 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
11 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
13 <body xmlns=
"http://www.w3.org/1999/xhtml">
14 <div id=
"content" style=
"display: none">
23 <scrollbar orient=
"horizontal"
27 <scrollbar orient=
"horizontal"
30 style=
"appearance: auto; -moz-default-appearance: scrollbar-small;"
31 id=
"horizontalSmall"/>
33 <scrollbar orient=
"vertical"
37 <scrollbar orient=
"vertical"
40 style=
"appearance: auto; -moz-default-appearance: scrollbar-small;"
47 <script class=
"testbody" type=
"application/javascript">
50 SimpleTest.waitForExplicitFinish();
53 [
"horizontal",
"vertical"].forEach(function (orient) {
54 [
"",
"Small"].forEach(function (size) {
55 var elem = document.getElementById(orient + size);
56 var thumbRect = SpecialPowers.unwrap(
57 SpecialPowers.InspectorUtils.getChildrenForNode(elem, true, false)[
0])
58 .childNodes[
0].getBoundingClientRect();
59 var sizeToCheck = orient ==
"horizontal" ?
"width" :
"height";
60 // var expectedSize = size ==
"Small" ?
19 :
26;
61 var expectedSize =
26;
62 is(thumbRect[sizeToCheck], expectedSize, size +
" scrollbar has wrong minimum " + sizeToCheck);
67 window.addEventListener(
"load", runTest);