toolkit/content/tests/chrome/window_preferences.xul

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:6a04e41945c1
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <!--
4 XUL Widget Test for preferences window
5 -->
6 <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7 title="preferences window"
8 windowtype="test:preferences"
9 buttons="accept,cancel"
10 onload="RunTest(window.arguments)"
11 >
12 <script type="application/javascript">
13 <![CDATA[
14 function RunTest(aArgs)
15 {
16 // run test
17 aArgs[0](this);
18 // close dialog
19 document.documentElement[aArgs[1] ? "acceptDialog" : "cancelDialog"]();
20 }
21 ]]>
22 </script>
23
24 <prefpane id="sample_pane" label="Sample Prefpane">
25 <preferences id="sample_preferences">
26 <!-- one of each type known to <preferences>.valueFromPreferences -->
27 <preference id ="tests.static_preference_int"
28 name="tests.static_preference_int"
29 type="int"/>
30 <preference id ="tests.static_preference_bool"
31 name="tests.static_preference_bool"
32 type="bool"/>
33 <preference id ="tests.static_preference_string"
34 name="tests.static_preference_string"
35 type="string"/>
36 <preference id ="tests.static_preference_wstring"
37 name="tests.static_preference_wstring"
38 type="wstring"/>
39 <preference id ="tests.static_preference_unichar"
40 name="tests.static_preference_unichar"
41 type="unichar"/>
42 <preference id ="tests.static_preference_file"
43 name="tests.static_preference_file"
44 type="file"/>
45 </preferences>
46
47 <!-- one element for each preference type above -->
48 <hbox>
49 <label flex="1" value="int"/>
50 <textbox id="static_element_int" preference="tests.static_preference_int"/>
51 </hbox>
52 <hbox>
53 <label flex="1" value="bool"/>
54 <checkbox id="static_element_bool" preference="tests.static_preference_bool"/>
55 </hbox>
56 <hbox>
57 <label flex="1" value="string"/>
58 <textbox id="static_element_string" preference="tests.static_preference_string"/>
59 </hbox>
60 <hbox>
61 <label flex="1" value="wstring"/>
62 <textbox id="static_element_wstring" preference="tests.static_preference_wstring"/>
63 </hbox>
64 <hbox>
65 <label flex="1" value="unichar"/>
66 <textbox id="static_element_unichar" preference="tests.static_preference_unichar"/>
67 </hbox>
68 <hbox>
69 <label flex="1" value="file"/>
70 <textbox id="static_element_file" preference="tests.static_preference_file"/>
71 </hbox>
72 </prefpane>
73 </prefwindow>

mercurial