View Javadoc
1   /*
2    * Copyright (c) 2002-2025 Gargoyle Software Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * https://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.htmlunit.libraries;
16  
17  import org.htmlunit.junit.BrowserRunner;
18  import org.junit.Test;
19  import org.junit.runner.RunWith;
20  
21  /**
22   * Tests for compatibility with version 1.9.3 of the <a href="http://dojotoolkit.org/">Dojo
23   * JavaScript library</a>.
24   *
25   * @author Ronald Brill
26   */
27  @RunWith(BrowserRunner.class)
28  public class Dojo193Test extends DojoTestBase {
29  
30      @Override
31      String getVersion() {
32          return "1.9.3";
33      }
34  
35      @Override
36      String getUrl(final String module) {
37          return URL_FIRST + "util/doh/runner.html?test=" + module;
38      }
39  
40      /**
41       * @throws Exception if an error occurs
42       */
43      @Test
44      public void dojo_tests__base_loader() throws Exception {
45          // TODO - Timeout
46          // test("dojo/tests/_base/loader");
47      }
48  
49      /**
50       * @throws Exception if an error occurs
51       */
52      @Test
53      public void dojo_tests__base_array() throws Exception {
54          test("dojo/tests/_base/array");
55      }
56  
57      /**
58       * @throws Exception if an error occurs
59       */
60      @Test
61      public void dojo_tests__base_color() throws Exception {
62          test("dojo/tests/_base/Color");
63      }
64  
65      /**
66       * @throws Exception if an error occurs
67       */
68      @Test
69      public void dojo_tests__base_lang() throws Exception {
70          test("dojo/tests/_base/lang");
71      }
72  
73      /**
74       * @throws Exception if an error occurs
75       */
76      @Test
77      public void dojo_tests__base_declare() throws Exception {
78          test("dojo/tests/_base/declare");
79      }
80  
81      /**
82       * @throws Exception if an error occurs
83       */
84      @Test
85      public void dojo_tests__base_connect() throws Exception {
86          test("dojo/tests/_base/connect");
87      }
88  
89      /**
90       * @throws Exception if an error occurs
91       */
92      @Test
93      public void dojo_tests__base_deferred() throws Exception {
94          test("dojo/tests/_base/Deferred");
95      }
96  
97      /**
98       * @throws Exception if an error occurs
99       */
100     @Test
101     public void dojo_tests__base_json() throws Exception {
102         test("dojo/tests/_base/json");
103     }
104 
105     /**
106      * @throws Exception if an error occurs
107      */
108     @Test
109     public void dojo_tests__base_object() throws Exception {
110         test("dojo/tests/_base/object");
111     }
112 
113     /**
114      * @throws Exception if an error occurs
115      */
116     @Test
117     public void dojo_tests__base_html() throws Exception {
118         test("dojo/tests/_base/html");
119     }
120 
121     /**
122      * @throws Exception if an error occurs
123      */
124     @Test
125     public void dojo_tests__base_domstyle() throws Exception {
126         // TODO - how to call this
127         // test("dojo/tests/_base/dom-style");
128     }
129 
130     /**
131      * @throws Exception if an error occurs
132      */
133     @Test
134     public void dojo_tests__base_fx() throws Exception {
135         test("dojo/tests/_base/fx");
136     }
137 
138     /**
139      * @throws Exception if an error occurs
140      */
141     @Test
142     public void dojo_tests__base_query() throws Exception {
143         test("dojo/tests/_base/query");
144     }
145 
146     /**
147      * @throws Exception if an error occurs
148      */
149     @Test
150     public void dojo_tests__base_xhr() throws Exception {
151         test("dojo/tests/_base/xhr");
152     }
153 
154     /**
155      * @throws Exception if an error occurs
156      */
157     @Test
158     public void dojo_tests__base_window() throws Exception {
159         test("dojo/tests/_base/window");
160     }
161 
162     /**
163      * @throws Exception if an error occurs
164      */
165     @Test
166     public void dojo_tests_aspect() throws Exception {
167         test("dojo/tests/aspect");
168     }
169 
170     /**
171      * @throws Exception if an error occurs
172      */
173     @Test
174     public void dojo_tests_back() throws Exception {
175         test("dojo/tests/back");
176     }
177 
178     /**
179      * @throws Exception if an error occurs
180      */
181     @Test
182     public void dojo_tests_behavior() throws Exception {
183         test("dojo/tests/behavior");
184     }
185 
186     /**
187      * @throws Exception if an error occurs
188      */
189     @Test
190     public void dojo_tests_cache() throws Exception {
191         test("dojo/tests/cache");
192     }
193 
194     /**
195      * @throws Exception if an error occurs
196      */
197     @Test
198     public void dojo_tests_cldr() throws Exception {
199         test("dojo/tests/cldr");
200     }
201 
202     /**
203      * @throws Exception if an error occurs
204      */
205     @Test
206     public void dojo_tests_colors() throws Exception {
207         test("dojo/tests/colors");
208     }
209 
210     /**
211      * @throws Exception if an error occurs
212      */
213     @Test
214     public void dojo_tests_cookie() throws Exception {
215         test("dojo/tests/cookie");
216     }
217 
218     /**
219      * @throws Exception if an error occurs
220      */
221     @Test
222     public void dojo_tests_currency() throws Exception {
223         test("dojo/tests/currency");
224     }
225 
226     /**
227      * @throws Exception if an error occurs
228      */
229     @Test
230     public void dojo_tests_data() throws Exception {
231         // TODO - Timeout
232         // test("dojo/tests/data");
233     }
234 
235     /**
236      * @throws Exception if an error occurs
237      */
238     @Test
239     public void dojo_tests_date() throws Exception {
240         test("dojo/tests/date");
241     }
242 
243     /**
244      * @throws Exception if an error occurs
245      */
246     @Test
247     public void dojo_tests_Deferred() throws Exception {
248         test("dojo/tests/Deferred");
249     }
250 
251     /**
252      * @throws Exception if an error occurs
253      */
254     @Test
255     public void dojo_tests_DeferredList() throws Exception {
256         test("dojo/tests/DeferredList");
257     }
258 
259     /**
260      * @throws Exception if an error occurs
261      */
262     @Test
263     public void dojo_tests_domStyle() throws Exception {
264         test("dojo/tests/dom-style");
265     }
266 
267     /**
268      * @throws Exception if an error occurs
269      */
270     @Test
271     public void dojo_tests_errors() throws Exception {
272         test("dojo/tests/errors");
273     }
274 
275     // This is not stable on the CI build
276     //    /**
277     //     * @throws Exception if an error occurs
278     //     */
279     //    @Test
280     //    public void dojo_tests_fx() throws Exception {
281     //        test("dojo/tests/fx");
282     //    }
283 
284     /**
285      * @throws Exception if an error occurs
286      */
287     @Test
288     public void dojo_tests_hash() throws Exception {
289         test("dojo/tests/hash");
290     }
291 
292     /**
293      * @throws Exception if an error occurs
294      */
295     @Test
296     public void dojo_tests_html() throws Exception {
297         test("dojo/tests/html");
298     }
299 
300     /**
301      * @throws Exception if an error occurs
302      */
303     @Test
304     public void dojo_tests_i18n() throws Exception {
305         test("dojo/tests/i18n");
306     }
307 
308     /**
309      * @throws Exception if an error occurs
310      */
311     @Test
312     public void dojo_tests_json() throws Exception {
313         test("dojo/tests/json");
314     }
315 
316     /**
317      * @throws Exception if an error occurs
318      */
319     @Test
320     public void dojo_tests_mouse() throws Exception {
321         test("dojo/tests/mouse");
322     }
323 
324     /**
325      * @throws Exception if an error occurs
326      */
327     @Test
328     public void dojo_tests_node() throws Exception {
329         test("dojo/tests/node");
330     }
331 
332     /**
333      * @throws Exception if an error occurs
334      */
335     @Test
336     public void dojo_tests_number() throws Exception {
337         test("dojo/tests/number");
338     }
339 
340     /**
341      * @throws Exception if an error occurs
342      */
343     @Test
344     public void dojo_tests_on() throws Exception {
345         test("dojo/tests/on");
346     }
347 
348     /**
349      * @throws Exception if an error occurs
350      */
351     @Test
352     public void dojo_tests_parser() throws Exception {
353         test("dojo/tests/parser");
354     }
355 
356     /**
357      * @throws Exception if an error occurs
358      */
359     @Test
360     public void dojo_tests_query() throws Exception {
361         test("dojo/tests/query");
362     }
363 
364     /**
365      * @throws Exception if an error occurs
366      */
367     @Test
368     public void dojo_tests_regexp() throws Exception {
369         test("dojo/tests/regexp");
370     }
371 
372     /**
373      * @throws Exception if an error occurs
374      */
375     @Test
376     public void dojo_tests_request() throws Exception {
377         test("dojo/tests/request");
378     }
379 
380 
381     /**
382      * @throws Exception if an error occurs
383      */
384     @Test
385     public void dojo_tests_router() throws Exception {
386         test("dojo/tests/router");
387     }
388 
389     /**
390      * @throws Exception if an error occurs
391      */
392     @Test
393     public void dojo_tests_stateful() throws Exception {
394         test("dojo/tests/Stateful");
395     }
396 
397     /**
398      * @throws Exception if an error occurs
399      */
400     @Test
401     public void dojo_tests_string() throws Exception {
402         test("dojo/tests/string");
403     }
404 
405     /**
406      * @throws Exception if an error occurs
407      */
408     @Test
409     public void dojo_tests_store() throws Exception {
410         test("dojo/tests/store");
411     }
412 
413     /**
414      * @throws Exception if an error occurs
415      */
416     @Test
417     public void dojo_tests_touch() throws Exception {
418         // TODO - fails with an exception
419         // test("dojo/tests/touch");
420     }
421 
422     /**
423      * @throws Exception if an error occurs
424      */
425     @Test
426     public void dojo_tests_uacss() throws Exception {
427         test("dojo/tests/uacss");
428     }
429 
430     /**
431      * @throws Exception if an error occurs
432      */
433     @Test
434     public void dojo_tests_when() throws Exception {
435         test("dojo/tests/when");
436     }
437 
438     /**
439      * @throws Exception if an error occurs
440      */
441     @Test
442     public void dojo_tests_window() throws Exception {
443         // TODO - Time
444         // test("dojo/tests/window", 300);
445     }
446 }