UnitTest:JQM Unit TC helper has been added,TCs have been modified
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.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                                 "widgets/forms/checkboxradio",
16                                 "widgets/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         <script src="../../../../../../tests/jqm-tchelper/tizen.testHelper.js"></script>
30 </head>
31 <body>
32
33 <h1 id="qunit-header">jQuery Mobile Checkbockradio Test Suite</h1>
34 <h2 id="qunit-banner"></h2>
35 <h2 id="qunit-userAgent"></h2>
36 <ol id="qunit-tests">
37 </ol>
38
39 <div data-nstest-role="page" data-nstest-theme="a">
40         <div data-nstest-role="content">
41
42                 <div data-nstest-role="fieldcontain">
43                         <fieldset data-nstest-role="controlgroup">
44                                 <legend>Agree to the terms:</legend>
45                                 <input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom"/>
46                                 <label for="checkbox-1">I agree</label>
47                         </fieldset>
48                 </div>
49
50                 <div data-nstest-role="fieldcontain">
51                         <fieldset data-nstest-role="controlgroup">
52                                 <legend>Agree to the terms:</legend>
53                                 <input type="checkbox" name="checkbox-2" id="checkbox-2" class="custom"/>
54                                 <label for="checkbox-2">I agree</label>
55                         </fieldset>
56                 </div>
57
58         <div data-nstest-role="fieldcontain" data-nstest-role="controlgroup">
59             <div>
60                 <legend>Agree to the terms 3.1:</legend>
61                 <input type="checkbox" name="checkbox-3" id="checkbox-31" class="custom"/>
62                 <label for="checkbox-31">I agree 3.1</label>
63             </div>
64             <div>
65                 <legend>Agree to the terms 3.2:</legend>
66                 <input type="checkbox" name="checkbox-3" id="checkbox-32" class="custom"/>
67                 <label for="checkbox-32">I agree 3.2</label>
68             </div>
69         </div>
70         </div>
71
72 <div data-role="fieldcontain" id="radio-active-btn-test">
73         <fieldset data-role="controlgroup">
74           <legend>Choose a pet:</legend>
75           <input type="radio" name="radio-pet-active-btn" id="radio-pet-1" value="choice-1" checked="checked"  />
76           <label for="radio-pet-1">Cat</label>
77
78           <input type="radio" name="radio-pet-active-btn" id="radio-pet-2" value="choice-2"  />
79           <label for="radio-pet-2">Dog</label>
80
81           <input type="radio" name="radio-pet-active-btn" id="radio-pet-3" value="choice-3"  />
82           <label for="radio-pet-3">Hamster</label>
83
84           <input type="radio" name="radio-pet-active-btn" id="radio-pet-4" value="choice-4"  />
85           <label for="radio-pet-4">Lizard</label>
86         </fieldset>
87 </div>
88
89 <div data-role="fieldcontain">
90         <input type="radio" name="radio-full" value="choice-3" id="radio-full" />
91         <label for="radio-full">Hamster</label>
92
93         <input type="radio" name="radio-mini" value="choice-3" id="radio-mini" data-nstest-mini="true" />
94         <label for="radio-mini">Hamster</label>
95
96         <div data-nstest-role="controlgroup" data-nstest-mini="true" id="mini-control">
97                 <input type="radio" name="radio-mini" value="choice-3" id="mini-ctrl" />
98                 <label for="mini-ctrl">Hamster</label>
99                 <input type="radio" name="full-ctrl" value="choice-3" id="full-ctrl" />
100                 <label for="full-ctrl">Hamster</label>
101         </div>
102 </div>
103
104
105 <div data-role="fieldcontain">
106         <fieldset data-role="controlgroup">
107                 <legend>Agree to the terms:</legend>
108                 <input type="checkbox" name="checkbox-1" id="checkbox-1" class="should-be-native" />
109                 <label for="checkbox-1">I agree</label>
110         </fieldset>
111 </div>
112
113 <div data-role="fieldcontain">
114         <fieldset data-role="controlgroup">
115                 <legend>Agree to the terms:</legend>
116                 <input type="checkbox" name="checkbox-click-triggered" id="checkbox-click-triggered"/>
117                 <label for="checkbox-click-triggered">click triggered</label>
118                 <input type="checkbox" name="checkbox-click-triggered" id="checkbox-click-triggered-2"/>
119                 <label for="checkbox-click-triggered-2">click triggered</label>
120
121                 <input type="radio" name="checkbox-change-triggered" id="checkbox-change-triggered"/>
122                 <label for="checkbox-change-triggered">click triggered</label>
123                 <input type="radio" name="checkbox-change-triggered" id="checkbox-change-triggered-2"/>
124                 <label for="checkbox-change-triggered-2">click triggered</label>
125         </fieldset>
126 </div>
127
128 <div data-role="fieldcontain">
129         <fieldset data-role="controlgroup">
130                 <legend>Agree to the terms:</legend>
131                 <input type="checkbox" name="checkbox-inherit-theme" id="checkbox-inherit-theme"/>
132                 <label for="checkbox-inherit-theme">foo</label>
133         </fieldset>
134
135         <fieldset data-role="controlgroup">
136                 <legend>Agree to the terms:</legend>
137                 <input type="checkbox" name="checkbox-explicit-theme" id="checkbox-explicit-theme" data-nstest-theme="b"/>
138                 <label for="checkbox-explicit-theme">foo</label>
139         </fieldset>
140 </div>
141                 
142 <div data-nstest-role="fieldcontain">
143         <fieldset data-nstest-role="controlgroup">
144                 <input type="checkbox" name="topicon" id="topicon" class="custom" data-nstest-iconpos="top" />
145                 <label for="topicon">I agree</label>
146
147                 <input type="checkbox" name="bottomicon" id="bottomicon" class="custom" />
148                 <label for="bottomicon" data-nstest-iconpos="bottom">I agree</label>
149         </fieldset>
150 </div>
151
152 <form id="radio-form" method="get" action="form-result.html">
153         <fieldset data-role="controlgroup" data-type="horizontal">
154                 <legend>Check one:</legend>
155                 <input type="radio" id="radio1" name="radio1" value="1" />
156                 <label for="radio1">Radio1</label>
157         </fieldset>
158 </form>
159
160
161 <form id="check-form" method="get" action="form-result.html">
162         <div data-role="fieldcontain">
163                 <fieldset data-role="controlgroup" data-type="horizontal">
164                         <legend>Font styling:</legend>
165                         <input type="checkbox" name="checkbox-form" id="checkbox-form" class="custom" />
166                         <label for="checkbox-form">b</label>
167
168                         <input type="checkbox" name="checkbox-form-2" id="checkbox-form-2" class="custom" />
169                         <label for="checkbox-form-2"><em>i</em></label>
170                 </fieldset>
171         </div>
172 </form>
173
174 </div>
175
176 <div id="enhancetest">
177         <input type="checkbox" name="checkbox-332" id="checkbox-332" class="custom"/>
178         <label for="checkbox-332">I agree 3.2</label>
179 </div>
180
181 <div id="exception-test">
182         <form>
183                 <input type="checkbox" name="checkbox-exception" id="checkbox-exception" class="custom"/>
184         </form>
185 </div>
186
187 <div id="nested-label-test">
188         <form>
189                 <label for="checkbox-nested-label">
190                         <input type="checkbox" name="checkbox-nested-label" id="checkbox-nested-label" class="custom"/>
191                 </label>
192         </form>
193 </div>
194
195 <div id="nested-label-no-for-test">
196   <form>
197     <label>
198       <input type="checkbox" name="checkbox-nested-label-no-for" id="checkbox-nested-label-no-for" class="custom"/>
199     </label>
200   </form>
201 </div>
202 </body>
203 </html>