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.general.huge;
16  
17  import java.util.Collection;
18  
19  import org.htmlunit.junit.annotation.Alerts;
20  import org.junit.jupiter.params.provider.Arguments;
21  
22  /**
23   * Tests two Host classes, if one prototype is parent of another.
24   *
25   * This class handles all host names which starts by character 'T' to 'V'.
26   *
27   * @author Ahmed Ashour
28   * @author Ronald Brill
29   */
30  public class HostParentOfTTest extends HostParentOf {
31  
32      /**
33       * Returns the parameterized data.
34       * @return the parameterized data
35       * @throws Exception if an error occurs
36       */
37      public static Collection<Arguments> data() throws Exception {
38          return HostParentOf.data(input -> {
39              final char ch = Character.toUpperCase(input.charAt(0));
40              return ch >= 'T' && ch <= 'V';
41          });
42      }
43  
44      @Alerts("true/true")
45      void _Text_CDATASection() throws Exception {
46          test("Text", "CDATASection");
47      }
48  
49      @Alerts("true/false")
50      void _Text_Text() throws Exception {
51          test("Text", "Text");
52      }
53  
54      @Alerts("true/false")
55      void _TextDecoder_TextDecoder() throws Exception {
56          test("TextDecoder", "TextDecoder");
57      }
58  
59      @Alerts("true/false")
60      void _TextEncoder_TextEncoder() throws Exception {
61          test("TextEncoder", "TextEncoder");
62      }
63  
64      @Alerts("true/false")
65      void _TextEvent_TextEvent() throws Exception {
66          test("TextEvent", "TextEvent");
67      }
68  
69      @Alerts("true/false")
70      void _TextMetrics_TextMetrics() throws Exception {
71          test("TextMetrics", "TextMetrics");
72      }
73  
74      @Alerts("false/false")
75      void _TextRange_TextRange() throws Exception {
76          test("TextRange", "TextRange");
77      }
78  
79      @Alerts("true/false")
80      void _TextTrack_TextTrack() throws Exception {
81          test("TextTrack", "TextTrack");
82      }
83  
84      @Alerts("true/false")
85      void _TextTrackCue_TextTrackCue() throws Exception {
86          test("TextTrackCue", "TextTrackCue");
87      }
88  
89      @Alerts("true/true")
90      void _TextTrackCue_VTTCue() throws Exception {
91          test("TextTrackCue", "VTTCue");
92      }
93  
94      @Alerts("true/false")
95      void _TextTrackCueList_TextTrackCueList() throws Exception {
96          test("TextTrackCueList", "TextTrackCueList");
97      }
98  
99      @Alerts("true/false")
100     void _TextTrackList_TextTrackList() throws Exception {
101         test("TextTrackList", "TextTrackList");
102     }
103 
104     @Alerts(DEFAULT = "false/false",
105             FF = "true/false",
106             FF_ESR = "true/false")
107     void _TimeEvent_TimeEvent() throws Exception {
108         test("TimeEvent", "TimeEvent");
109     }
110 
111     @Alerts("true/false")
112     void _TimeRanges_TimeRanges() throws Exception {
113         test("TimeRanges", "TimeRanges");
114     }
115 
116     @Alerts(DEFAULT = "false/false",
117             CHROME = "true/false",
118             EDGE = "true/false")
119     void _Touch_Touch() throws Exception {
120         test("Touch", "Touch");
121     }
122 
123     @Alerts(DEFAULT = "false/false",
124             CHROME = "true/false",
125             EDGE = "true/false")
126     void _TouchEvent_TouchEvent() throws Exception {
127         test("TouchEvent", "TouchEvent");
128     }
129 
130     @Alerts(DEFAULT = "false/false",
131             CHROME = "true/false",
132             EDGE = "true/false")
133     void _TouchList_TouchList() throws Exception {
134         test("TouchList", "TouchList");
135     }
136 
137     @Alerts("true/false")
138     void _TrackEvent_TrackEvent() throws Exception {
139         test("TrackEvent", "TrackEvent");
140     }
141 
142     @Alerts("true/false")
143     void _TransitionEvent_TransitionEvent() throws Exception {
144         test("TransitionEvent", "TransitionEvent");
145     }
146 
147     @Alerts("true/false")
148     void _TreeWalker_TreeWalker() throws Exception {
149         test("TreeWalker", "TreeWalker");
150     }
151 
152     @Alerts("true/true")
153     void _UIEvent_CompositionEvent() throws Exception {
154         test("UIEvent", "CompositionEvent");
155     }
156 
157     @Alerts("true/false")
158     void _UIEvent_DragEvent() throws Exception {
159         test("UIEvent", "DragEvent");
160     }
161 
162     @Alerts("true/true")
163     void _UIEvent_FocusEvent() throws Exception {
164         test("UIEvent", "FocusEvent");
165     }
166 
167     @Alerts("true/true")
168     void _UIEvent_InputEvent() throws Exception {
169         test("UIEvent", "InputEvent");
170     }
171 
172     @Alerts("true/true")
173     void _UIEvent_KeyboardEvent() throws Exception {
174         test("UIEvent", "KeyboardEvent");
175     }
176 
177     @Alerts("true/true")
178     void _UIEvent_MouseEvent() throws Exception {
179         test("UIEvent", "MouseEvent");
180     }
181 
182     @Alerts(DEFAULT = "false/false",
183             FF = "true/false",
184             FF_ESR = "true/false")
185     void _UIEvent_MouseScrollEvent() throws Exception {
186         test("UIEvent", "MouseScrollEvent");
187     }
188 
189     @Alerts("false/false")
190     void _UIEvent_MouseWheelEvent() throws Exception {
191         test("UIEvent", "MouseWheelEvent");
192     }
193 
194     @Alerts("false/false")
195     void _UIEvent_MSGestureEvent() throws Exception {
196         test("UIEvent", "MSGestureEvent");
197     }
198 
199     @Alerts("true/false")
200     void _UIEvent_PointerEvent() throws Exception {
201         test("UIEvent", "PointerEvent");
202     }
203 
204     @Alerts("false/false")
205     void _UIEvent_SVGZoomEvent() throws Exception {
206         test("UIEvent", "SVGZoomEvent");
207     }
208 
209     @Alerts("true/true")
210     void _UIEvent_TextEvent() throws Exception {
211         test("UIEvent", "TextEvent");
212     }
213 
214     @Alerts(DEFAULT = "false/false",
215             CHROME = "true/true",
216             EDGE = "true/true")
217     void _UIEvent_TouchEvent() throws Exception {
218         test("UIEvent", "TouchEvent");
219     }
220 
221     @Alerts("true/false")
222     void _UIEvent_UIEvent() throws Exception {
223         test("UIEvent", "UIEvent");
224     }
225 
226     @Alerts("true/false")
227     void _UIEvent_WheelEvent() throws Exception {
228         test("UIEvent", "WheelEvent");
229     }
230 
231     @Alerts("true/false")
232     void _Uint16Array_Uint16Array() throws Exception {
233         test("Uint16Array", "Uint16Array");
234     }
235 
236     @Alerts("true/false")
237     void _Uint32Array_Uint32Array() throws Exception {
238         test("Uint32Array", "Uint32Array");
239     }
240 
241     @Alerts("true/false")
242     void _Uint8Array_Uint8Array() throws Exception {
243         test("Uint8Array", "Uint8Array");
244     }
245 
246     @Alerts("true/false")
247     void _Uint8ClampedArray_Uint8ClampedArray() throws Exception {
248         test("Uint8ClampedArray", "Uint8ClampedArray");
249     }
250 
251     @Alerts("true/false")
252     void _URIError_URIError() throws Exception {
253         test("URIError", "URIError");
254     }
255 
256     @Alerts("true/false")
257     void _URL_URL() throws Exception {
258         test("URL", "URL");
259     }
260 
261     @Alerts("true/false")
262     void _URL_webkitURL() throws Exception {
263         test("URL", "webkitURL");
264     }
265 
266     @Alerts("true/false")
267     void _URLSearchParams_URLSearchParams() throws Exception {
268         test("URLSearchParams", "URLSearchParams");
269     }
270 
271     @Alerts("false/false")
272     void _UserProximityEvent_UserProximityEvent() throws Exception {
273         test("UserProximityEvent", "UserProximityEvent");
274     }
275 
276     @Alerts("true/false")
277     void _ValidityState_ValidityState() throws Exception {
278         test("ValidityState", "ValidityState");
279     }
280 
281     @Alerts("true/false")
282     void _VideoPlaybackQuality_VideoPlaybackQuality() throws Exception {
283         test("VideoPlaybackQuality", "VideoPlaybackQuality");
284     }
285 
286     @Alerts("true/false")
287     void _VTTCue_VTTCue() throws Exception {
288         test("VTTCue", "VTTCue");
289     }
290 }