2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css"
5 <window title=
"Mac platform colors"
6 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
8 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
10 <body xmlns=
"http://www.w3.org/1999/xhtml">
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=518395">Mozilla Bug
518395</a>
13 <div id=
"content" style=
"display: none">
18 <box id=
"colorbox"></box>
21 <script class=
"testbody" type=
"application/javascript">
25 "activeborder": [
"rgb(0, 0, 0)"],
26 "activecaption": [
"rgb(204, 204, 204)"],
27 "appworkspace": [
"rgb(255, 255, 255)"],
28 "background": [
"rgb(99, 99, 206)"],
29 "buttonface": [
"rgb(240, 240, 240)"],
30 "buttonhighlight": [
"rgb(255, 255, 255)"],
31 "buttonshadow": [
"rgb(220, 220, 220)"],
32 "buttontext": [
"rgb(0, 0, 0)"],
33 "captiontext": [
"rgb(0, 0, 0)"],
34 "graytext": [
"rgb(127, 127, 127)"],
35 "highlight": [
"rgb(115, 132, 153)",
"rgb(127, 127, 127)",
"rgb(56, 117, 215)",
"rgb(255, 193, 31)",
"rgb(243, 70, 72)",
"rgb(255, 138, 34)",
"rgb(102, 197, 71)",
"rgb(140, 78, 184)"],
36 "highlighttext": [
"rgb(255, 255, 255)",
"rgb(255, 254, 254)",
"rgb(254, 255, 254)"],
37 "inactiveborder": [
"rgb(255, 255, 255)"],
38 "inactivecaption": [
"rgb(255, 255, 255)"],
39 "inactivecaptiontext": [
"rgb(69, 69, 69)"],
40 "infobackground": [
"rgb(255, 255, 199)"],
41 "infotext": [
"rgb(0, 0, 0)"],
42 "menu": [
"rgb(255, 255, 255)",
"rgb(254, 255, 254)",
"rgb(255, 254, 254)"],
43 "menutext": [
"rgb(0, 0, 0)"],
44 "scrollbar": [
"rgb(170, 170, 170)"],
45 "threeddarkshadow": [
"rgb(220, 220, 220)"],
46 "threedface": [
"rgb(240, 240, 240)"],
47 "threedhighlight": [
"rgb(255, 255, 255)"],
48 "threedlightshadow": [
"rgb(218, 218, 218)"],
49 "threedshadow": [
"rgb(224, 224, 224)"],
50 "window": [
"rgb(255, 255, 255)"],
51 "windowframe": [
"rgb(204, 204, 204)"],
52 "windowtext": [
"rgb(0, 0, 0)"],
53 "-moz-activehyperlinktext": [
"rgb(238, 0, 0)"],
54 "-moz-buttonhoverface": [
"rgb(240, 240, 240)"],
55 "-moz-buttonhovertext": [
"rgb(0, 0, 0)"],
56 "-moz-cellhighlight": [
"rgb(212, 212, 212)",
"rgb(220, 220, 220)"],
57 "-moz-cellhighlighttext": [
"rgb(0, 0, 0)"],
58 "-moz-eventreerow": [
"rgb(255, 255, 255)"],
59 "-moz-field": [
"rgb(255, 255, 255)"],
60 "-moz-fieldtext": [
"rgb(0, 0, 0)"],
61 "-moz-dialog": [
"rgb(232, 232, 232)"],
62 "-moz-dialogtext": [
"rgb(0, 0, 0)"],
63 "-moz-hyperlinktext": [
"rgb(0, 0, 238)"],
64 "-moz-html-cellhighlight": [
"rgb(212, 212, 212)"],
65 "-moz-html-cellhighlighttext": [
"rgb(0, 0, 0)"],
66 "-moz-buttonactivetext": [
"rgb(0, 0, 0)",
"rgb(255, 255, 255)"],
67 "-moz-mac-defaultbuttontext": [
"rgb(0, 0, 0)",
"rgb(255, 255, 255)"],
68 //
"-moz-mac-focusring": [
"rgb(83, 144, 210)",
"rgb(95, 112, 130)",
"rgb(63, 152, 221)",
"rgb(108, 126, 141)"],
69 "-moz-mac-menutextdisable": [
"rgb(152, 152, 152)"],
70 "-moz-mac-menutextselect": [
"rgb(255, 255, 255)"],
71 "-moz-mac-disabledtoolbartext": [
"rgb(127, 127, 127)"],
72 "-moz-menuhover": [
"rgb(115, 132, 153)",
"rgb(127, 127, 127)",
"rgb(56, 117, 215)",
"rgb(255, 193, 31)",
"rgb(243, 70, 72)",
"rgb(255, 138, 34)",
"rgb(102, 197, 71)",
"rgb(140, 78, 184)"],
73 "-moz-menuhovertext": [
"rgb(255, 255, 255)",
"rgb(255, 254, 254)",
"rgb(254, 255, 254)"],
74 //
"-moz-menubarhovertext": [
"rgb(255, 255, 255)"],
75 "-moz-oddtreerow": [
"rgb(236, 242, 254)",
"rgb(240, 240, 240)",
"rgb(243, 245, 250)",
"rgb(243, 246, 250)",
"rgb(245, 245, 245)"],
76 "-moz-visitedhyperlinktext": [
"rgb(85, 26, 139)"],
77 "currentcolor": [
"rgb(0, 0, 0)"],
78 "-moz-nativehyperlinktext": [
"rgb(20, 79, 174)"],
79 "-moz-comboboxtext": [
"rgb(0, 0, 0)"],
80 "-moz-combobox": [
"rgb(255, 255, 255)"]
83 var colorbox = document.getElementById('colorbox');
85 for (var c in colors) {
86 dump(
"testing color " + c +
"\n");
87 colorbox.style.backgroundColor = c;
88 var rgb = document.defaultView.getComputedStyle(colorbox).getPropertyValue('background-color');
89 ok(colors[c].includes(rgb) || colors[c].length ==
8, 'platform color ' + c + ' is wrong: ' + rgb);