Revert "Export"
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / tests / unit / checkboxradio / index.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4         <meta charset="UTF-8" />
5         <title>jQuery Mobile Checkboxradio Test Suite</title>
6
7         <script src="../../../external/requirejs/require.js"></script>
8         <script src="../../../js/jquery.tag.inserter.js"></script>
9         <script src="../jquery.setNameSpace.js"></script>
10         <script src="../../../tests/jquery.testHelper.js"></script>
11         <script src="../../../external/qunit.js"></script>
12         <script>
13                 $.testHelper.asyncLoad([
14                         [
15                                 "jquery.mobile.forms.checkboxradio",
16                                 "jquery.mobile.page" // Needed by the test suite
17                         ],
18                         [
19                                 "checkboxradio_core.js"
20                         ],
21                         [ "jquery.mobile.init" ]
22                 ]);
23         </script>
24
25         <link rel="stylesheet"  href="../../../css/themes/default/jquery.mobile.css"/>
26         <link rel="stylesheet" href="../../../external/qunit.css"/>
27
28         <script src="../swarminject.js"></script>
29 </head>
30 <body>
31
32 <h1 id="qunit-header">jQuery Mobile Checkbockradio Test Suite</h1>
33 <h2 id="qunit-banner"></h2>
34 <h2 id="qunit-userAgent"></h2>
35 <ol id="qunit-tests">
36 </ol>
37
38 <div data-nstest-role="page" data-nstest-theme="a">
39         <div data-nstest-role="content">
40
41                 <div data-nstest-role="fieldcontain">
42                         <fieldset data-nstest-role="controlgroup">
43                                 <legend>Agree to the terms:</legend>
44                                 <input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom"/>
45                                 <label for="checkbox-1">I agree</label>
46                         </fieldset>
47                 </div>
48
49                 <div data-nstest-role="fieldcontain">
50                         <fieldset data-nstest-role="controlgroup">
51                                 <legend>Agree to the terms:</legend>
52                                 <input type="checkbox" name="checkbox-2" id="checkbox-2" class="custom"/>
53                                 <label for="checkbox-2">I agree</label>
54                         </fieldset>
55                 </div>
56
57         <div data-nstest-role="fieldcontain" data-nstest-role="controlgroup">
58             <div>
59                 <legend>Agree to the terms 3.1:</legend>
60                 <input type="checkbox" name="checkbox-3" id="checkbox-31" class="custom"/>
61                 <label for="checkbox-31">I agree 3.1</label>
62             </div>
63             <div>
64                 <legend>Agree to the terms 3.2:</legend>
65                 <input type="checkbox" name="checkbox-3" id="checkbox-32" class="custom"/>
66                 <label for="checkbox-32">I agree 3.2</label>
67             </div>
68         </div>
69         </div>
70
71 <div data-role="fieldcontain" id="radio-active-btn-test">
72         <fieldset data-role="controlgroup">
73           <legend>Choose a pet:</legend>
74           <input type="radio" name="radio-pet-active-btn" id="radio-pet-1" value="choice-1" checked="checked"  />
75           <label for="radio-pet-1">Cat</label>
76
77           <input type="radio" name="radio-pet-active-btn" id="radio-pet-2" value="choice-2"  />
78           <label for="radio-pet-2">Dog</label>
79
80           <input type="radio" name="radio-pet-active-btn" id="radio-pet-3" value="choice-3"  />
81           <label for="radio-pet-3">Hamster</label>
82
83           <input type="radio" name="radio-pet-active-btn" id="radio-pet-4" value="choice-4"  />
84           <label for="radio-pet-4">Lizard</label>
85         </fieldset>
86 </div>
87
88 <div data-role="fieldcontain">
89         <input type="radio" name="radio-full" value="choice-3" id="radio-full" />
90         <label for="radio-full">Hamster</label>
91
92         <input type="radio" name="radio-mini" value="choice-3" id="radio-mini" data-nstest-mini="true" />
93         <label for="radio-mini">Hamster</label>
94
95         <div data-nstest-role="controlgroup" data-nstest-mini="true" id="mini-control">
96                 <input type="radio" name="radio-mini" value="choice-3" id="mini-ctrl" />
97                 <label for="mini-ctrl">Hamster</label>
98                 <input type="radio" name="full-ctrl" value="choice-3" id="full-ctrl" />
99                 <label for="full-ctrl">Hamster</label>
100         </div>
101 </div>
102
103
104 <div data-role="fieldcontain">
105         <fieldset data-role="controlgroup">
106                 <legend>Agree to the terms:</legend>
107                 <input type="checkbox" name="checkbox-1" id="checkbox-1" class="should-be-native" />
108                 <label for="checkbox-1">I agree</label>
109         </fieldset>
110 </div>
111
112 <div data-role="fieldcontain">
113         <fieldset data-role="controlgroup">
114                 <legend>Agree to the terms:</legend>
115                 <input type="checkbox" name="checkbox-click-triggered" id="checkbox-click-triggered"/>
116                 <label for="checkbox-click-triggered">click triggered</label>
117                 <input type="checkbox" name="checkbox-click-triggered" id="checkbox-click-triggered-2"/>
118                 <label for="checkbox-click-triggered-2">click triggered</label>
119
120                 <input type="radio" name="checkbox-change-triggered" id="checkbox-change-triggered"/>
121                 <label for="checkbox-change-triggered">click triggered</label>
122                 <input type="radio" name="checkbox-change-triggered" id="checkbox-change-triggered-2"/>
123                 <label for="checkbox-change-triggered-2">click triggered</label>
124         </fieldset>
125 </div>
126
127 <div data-role="fieldcontain">
128         <fieldset data-role="controlgroup">
129                 <legend>Agree to the terms:</legend>
130                 <input type="checkbox" name="checkbox-inherit-theme" id="checkbox-inherit-theme"/>
131                 <label for="checkbox-inherit-theme">foo</label>
132         </fieldset>
133
134         <fieldset data-role="controlgroup">
135                 <legend>Agree to the terms:</legend>
136                 <input type="checkbox" name="checkbox-explicit-theme" id="checkbox-explicit-theme" data-nstest-theme="b"/>
137                 <label for="checkbox-explicit-theme">foo</label>
138         </fieldset>
139 </div>
140                 
141 <div data-nstest-role="fieldcontain">
142         <fieldset data-nstest-role="controlgroup">
143                 <input type="checkbox" name="topicon" id="topicon" class="custom" data-nstest-iconpos="top" />
144                 <label for="topicon">I agree</label>
145
146                 <input type="checkbox" name="bottomicon" id="bottomicon" class="custom" />
147                 <label for="bottomicon" data-nstest-iconpos="bottom">I agree</label>
148         </fieldset>
149 </div>
150
151 <form id="radio-form" method="get" action="form-result.html">
152         <fieldset data-role="controlgroup" data-type="horizontal">
153                 <legend>Check one:</legend>
154                 <input type="radio" id="radio1" name="radio1" value="1" />
155                 <label for="radio1">Radio1</label>
156         </fieldset>
157 </form>
158
159
160 <form id="check-form" method="get" action="form-result.html">
161         <div data-role="fieldcontain">
162                 <fieldset data-role="controlgroup" data-type="horizontal">
163                         <legend>Font styling:</legend>
164                         <input type="checkbox" name="checkbox-form" id="checkbox-form" class="custom" />
165                         <label for="checkbox-form">b</label>
166
167                         <input type="checkbox" name="checkbox-form-2" id="checkbox-form-2" class="custom" />
168                         <label for="checkbox-form-2"><em>i</em></label>
169                 </fieldset>
170         </div>
171 </form>
172
173 </div>
174
175 <div id="enhancetest">
176         <input type="checkbox" name="checkbox-332" id="checkbox-332" class="custom"/>
177         <label for="checkbox-332">I agree 3.2</label>
178 </div>
179
180 <div id="exception-test">
181         <form>
182                 <input type="checkbox" name="checkbox-exception" id="checkbox-exception" class="custom"/>
183         </form>
184 </div>
185
186 <div id="nested-label-test">
187         <form>
188                 <label for="checkbox-nested-label">
189                         <input type="checkbox" name="checkbox-nested-label" id="checkbox-nested-label" class="custom"/>
190                 </label>
191         </form>
192 </div>
193
194 <div id="nested-label-no-for-test">
195   <form>
196     <label>
197       <input type="checkbox" name="checkbox-nested-label-no-for" id="checkbox-nested-label-no-for" class="custom"/>
198     </label>
199   </form>
200 </div>
201 </body>
202 </html>