4 <meta charset="UTF-8" />
5 <title>jQuery Mobile Checkboxradio Test Suite</title>
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>
13 $.testHelper.asyncLoad([
15 "jquery.mobile.forms.checkboxradio",
16 "jquery.mobile.page" // Needed by the test suite
19 "checkboxradio_core.js"
21 [ "jquery.mobile.init" ]
25 <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
26 <link rel="stylesheet" href="../../../external/qunit.css"/>
28 <script src="../swarminject.js"></script>
32 <h1 id="qunit-header">jQuery Mobile Checkbockradio Test Suite</h1>
33 <h2 id="qunit-banner"></h2>
34 <h2 id="qunit-userAgent"></h2>
38 <div data-nstest-role="page" data-nstest-theme="a">
39 <div data-nstest-role="content">
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>
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>
57 <div data-nstest-role="fieldcontain" data-nstest-role="controlgroup">
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>
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>
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>
77 <input type="radio" name="radio-pet-active-btn" id="radio-pet-2" value="choice-2" />
78 <label for="radio-pet-2">Dog</label>
80 <input type="radio" name="radio-pet-active-btn" id="radio-pet-3" value="choice-3" />
81 <label for="radio-pet-3">Hamster</label>
83 <input type="radio" name="radio-pet-active-btn" id="radio-pet-4" value="choice-4" />
84 <label for="radio-pet-4">Lizard</label>
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>
92 <input type="radio" name="radio-mini" value="choice-3" id="radio-mini" data-nstest-mini="true" />
93 <label for="radio-mini">Hamster</label>
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>
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>
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>
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>
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>
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>
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>
146 <input type="checkbox" name="bottomicon" id="bottomicon" class="custom" />
147 <label for="bottomicon" data-nstest-iconpos="bottom">I agree</label>
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>
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>
167 <input type="checkbox" name="checkbox-form-2" id="checkbox-form-2" class="custom" />
168 <label for="checkbox-form-2"><em>i</em></label>
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>
180 <div id="exception-test">
182 <input type="checkbox" name="checkbox-exception" id="checkbox-exception" class="custom"/>
186 <div id="nested-label-test">
188 <label for="checkbox-nested-label">
189 <input type="checkbox" name="checkbox-nested-label" id="checkbox-nested-label" class="custom"/>
194 <div id="nested-label-no-for-test">
197 <input type="checkbox" name="checkbox-nested-label-no-for" id="checkbox-nested-label-no-for" class="custom"/>