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 'P' to 'R'.
26   *
27   * @author Ahmed Ashour
28   * @author Ronald Brill
29   */
30  public class HostParentOfPTest extends HostParentOf {
31  
32      /**
33       * Returns the parameterized data.
34       *
35       * @return the parameterized data
36       * @throws Exception
37       *             if an error occurs
38       */
39      public static Collection<Arguments> data() throws Exception {
40          return HostParentOf.data(input -> {
41              final char ch = Character.toUpperCase(input.charAt(0));
42              return ch >= 'P' && ch <= 'R';
43          });
44      }
45  
46      @Alerts("true/false")
47      void _PageTransitionEvent_PageTransitionEvent() throws Exception {
48          test("PageTransitionEvent", "PageTransitionEvent");
49      }
50  
51      @Alerts("true/false")
52      void _PannerNode_PannerNode() throws Exception {
53          test("PannerNode", "PannerNode");
54      }
55  
56      @Alerts(DEFAULT = "false/false",
57              CHROME = "true/false",
58              EDGE = "true/false")
59      void _PasswordCredential_PasswordCredential() throws Exception {
60          test("PasswordCredential", "PasswordCredential");
61      }
62  
63      @Alerts("true/false")
64      void _Path2D_Path2D() throws Exception {
65          test("Path2D", "Path2D");
66      }
67  
68      @Alerts(DEFAULT = "false/false",
69              CHROME = "true/false",
70              EDGE = "true/false")
71      void _PaymentAddress_PaymentAddress() throws Exception {
72          test("PaymentAddress", "PaymentAddress");
73      }
74  
75      @Alerts(DEFAULT = "false/false",
76              CHROME = "true/false",
77              EDGE = "true/false")
78      void _PaymentRequest_PaymentRequest() throws Exception {
79          test("PaymentRequest", "PaymentRequest");
80      }
81  
82      @Alerts(DEFAULT = "false/false",
83              CHROME = "true/false",
84              EDGE = "true/false")
85      void _PaymentResponse_PaymentResponse() throws Exception {
86          test("PaymentResponse", "PaymentResponse");
87      }
88  
89      @Alerts("true/false")
90      void _Performance_Performance() throws Exception {
91          test("Performance", "Performance");
92      }
93  
94      @Alerts("true/false")
95      void _PerformanceEntry_PerformanceEntry() throws Exception {
96          test("PerformanceEntry", "PerformanceEntry");
97      }
98  
99      @Alerts("true/true")
100     void _PerformanceEntry_PerformanceMark() throws Exception {
101         test("PerformanceEntry", "PerformanceMark");
102     }
103 
104     @Alerts("true/true")
105     void _PerformanceEntry_PerformanceMeasure() throws Exception {
106         test("PerformanceEntry", "PerformanceMeasure");
107     }
108 
109     @Alerts("true/false")
110     void _PerformanceEntry_PerformanceNavigationTiming() throws Exception {
111         test("PerformanceEntry", "PerformanceNavigationTiming");
112     }
113 
114     @Alerts("true/true")
115     void _PerformanceEntry_PerformanceResourceTiming() throws Exception {
116         test("PerformanceEntry", "PerformanceResourceTiming");
117     }
118 
119     @Alerts("true/false")
120     void _PerformanceMark_PerformanceMark() throws Exception {
121         test("PerformanceMark", "PerformanceMark");
122     }
123 
124     @Alerts("true/false")
125     void _PerformanceMeasure_PerformanceMeasure() throws Exception {
126         test("PerformanceMeasure", "PerformanceMeasure");
127     }
128 
129     @Alerts("true/false")
130     void _PerformanceNavigation_PerformanceNavigation() throws Exception {
131         test("PerformanceNavigation", "PerformanceNavigation");
132     }
133 
134     @Alerts("true/false")
135     void _PerformanceNavigationTiming_PerformanceNavigationTiming() throws Exception {
136         test("PerformanceNavigationTiming", "PerformanceNavigationTiming");
137     }
138 
139     @Alerts("true/false")
140     void _PerformanceObserver_PerformanceObserver() throws Exception {
141         test("PerformanceObserver", "PerformanceObserver");
142     }
143 
144     @Alerts("true/false")
145     void _PerformanceObserverEntryList_PerformanceObserverEntryList() throws Exception {
146         test("PerformanceObserverEntryList", "PerformanceObserverEntryList");
147     }
148 
149     @Alerts("true/true")
150     void _PerformanceResourceTiming_PerformanceNavigationTiming() throws Exception {
151         test("PerformanceResourceTiming", "PerformanceNavigationTiming");
152     }
153 
154     @Alerts("true/false")
155     void _PerformanceResourceTiming_PerformanceResourceTiming() throws Exception {
156         test("PerformanceResourceTiming", "PerformanceResourceTiming");
157     }
158 
159     @Alerts("true/false")
160     void _PerformanceTiming_PerformanceTiming() throws Exception {
161         test("PerformanceTiming", "PerformanceTiming");
162     }
163 
164     @Alerts(DEFAULT = "false/false",
165             CHROME = "true/false",
166             EDGE = "true/false")
167     void _PeriodicSyncManager_PeriodicSyncManager() throws Exception {
168         test("PeriodicSyncManager", "PeriodicSyncManager");
169     }
170 
171     @Alerts("true/false")
172     void _PeriodicWave_PeriodicWave() throws Exception {
173         test("PeriodicWave", "PeriodicWave");
174     }
175 
176     @Alerts("true/false")
177     void _Permissions_Permissions() throws Exception {
178         test("Permissions", "Permissions");
179     }
180 
181     @Alerts("true/false")
182     void _PermissionStatus_PermissionStatus() throws Exception {
183         test("PermissionStatus", "PermissionStatus");
184     }
185 
186     @Alerts("true/false")
187     void _Plugin_Plugin() throws Exception {
188         test("Plugin", "Plugin");
189     }
190 
191     @Alerts("true/false")
192     void _PluginArray_PluginArray() throws Exception {
193         test("PluginArray", "PluginArray");
194     }
195 
196     @Alerts("true/false")
197     void _PointerEvent_PointerEvent() throws Exception {
198         test("PointerEvent", "PointerEvent");
199     }
200 
201     @Alerts("true/false")
202     void _PopStateEvent_PopStateEvent() throws Exception {
203         test("PopStateEvent", "PopStateEvent");
204     }
205 
206     @Alerts("false/false")
207     void _Position_Position() throws Exception {
208         test("Position", "Position");
209     }
210 
211     @Alerts("false/false")
212     void _PositionError_PositionError() throws Exception {
213         test("PositionError", "PositionError");
214     }
215 
216     @Alerts(DEFAULT = "false/false",
217             CHROME = "true/false",
218             EDGE = "true/false")
219     void _Presentation_Presentation() throws Exception {
220         test("Presentation", "Presentation");
221     }
222 
223     @Alerts(DEFAULT = "false/false",
224             CHROME = "true/false",
225             EDGE = "true/false")
226     void _PresentationAvailability_PresentationAvailability() throws Exception {
227         test("PresentationAvailability", "PresentationAvailability");
228     }
229 
230     @Alerts(DEFAULT = "false/false",
231             CHROME = "true/false",
232             EDGE = "true/false")
233     void _PresentationConnection_PresentationConnection() throws Exception {
234         test("PresentationConnection", "PresentationConnection");
235     }
236 
237     @Alerts(DEFAULT = "false/false",
238             CHROME = "true/false",
239             EDGE = "true/false")
240     void _PresentationConnectionAvailableEvent_PresentationConnectionAvailableEvent() throws Exception {
241         test("PresentationConnectionAvailableEvent", "PresentationConnectionAvailableEvent");
242     }
243 
244     @Alerts(DEFAULT = "false/false",
245             CHROME = "true/false",
246             EDGE = "true/false")
247     void _PresentationConnectionCloseEvent_PresentationConnectionCloseEvent() throws Exception {
248         test("PresentationConnectionCloseEvent", "PresentationConnectionCloseEvent");
249     }
250 
251     @Alerts(DEFAULT = "false/false",
252             CHROME = "true/false",
253             EDGE = "true/false")
254     void _PresentationRequest_PresentationRequest() throws Exception {
255         test("PresentationRequest", "PresentationRequest");
256     }
257 
258     @Alerts("true/false")
259     void _ProcessingInstruction_ProcessingInstruction() throws Exception {
260         test("ProcessingInstruction", "ProcessingInstruction");
261     }
262 
263     @Alerts("true/false")
264     void _ProgressEvent_ProgressEvent() throws Exception {
265         test("ProgressEvent", "ProgressEvent");
266     }
267 
268     @Alerts("true/false")
269     void _Promise_Promise() throws Exception {
270         test("Promise", "Promise");
271     }
272 
273     @Alerts("true/false")
274     void _PromiseRejectionEvent_PromiseRejectionEvent() throws Exception {
275         test("PromiseRejectionEvent", "PromiseRejectionEvent");
276     }
277 
278     @Alerts("true/false")
279     void _PushManager_PushManager() throws Exception {
280         test("PushManager", "PushManager");
281     }
282 
283     @Alerts("true/false")
284     void _PushSubscription_PushSubscription() throws Exception {
285         test("PushSubscription", "PushSubscription");
286     }
287 
288     @Alerts("true/false")
289     void _PushSubscriptionOptions_PushSubscriptionOptions() throws Exception {
290         test("PushSubscriptionOptions", "PushSubscriptionOptions");
291     }
292 
293     @Alerts("true/false")
294     void _RadioNodeList_RadioNodeList() throws Exception {
295         test("RadioNodeList", "RadioNodeList");
296     }
297 
298     @Alerts("true/false")
299     void _Range_Range() throws Exception {
300         test("Range", "Range");
301     }
302 
303     @Alerts("true/false")
304     void _ReadableStream_ReadableStream() throws Exception {
305         test("ReadableStream", "ReadableStream");
306     }
307 
308     @Alerts(DEFAULT = "false/false",
309             CHROME = "true/false",
310             EDGE = "true/false")
311     void _RemotePlayback_RemotePlayback() throws Exception {
312         test("RemotePlayback", "RemotePlayback");
313     }
314 
315     @Alerts("true/false")
316     void _Request_Request() throws Exception {
317         test("Request", "Request");
318     }
319 
320     @Alerts("true/false")
321     void _Response_Response() throws Exception {
322         test("Response", "Response");
323     }
324 
325     @Alerts("true/false")
326     void _RTCCertificate_RTCCertificate() throws Exception {
327         test("RTCCertificate", "RTCCertificate");
328     }
329 
330     @Alerts("true/false")
331     void _RTCDataChannelEvent_RTCDataChannelEvent() throws Exception {
332         test("RTCDataChannelEvent", "RTCDataChannelEvent");
333     }
334 
335     @Alerts("false/false")
336     void _RTCIceCandidate_mozRTCIceCandidate() throws Exception {
337         test("RTCIceCandidate", "mozRTCIceCandidate");
338     }
339 
340     @Alerts("true/false")
341     void _RTCIceCandidate_RTCIceCandidate() throws Exception {
342         test("RTCIceCandidate", "RTCIceCandidate");
343     }
344 
345     @Alerts("false/false")
346     void _RTCPeerConnection_mozRTCPeerConnection() throws Exception {
347         test("RTCPeerConnection", "mozRTCPeerConnection");
348     }
349 
350     @Alerts("true/false")
351     void _RTCPeerConnection_RTCPeerConnection() throws Exception {
352         test("RTCPeerConnection", "RTCPeerConnection");
353     }
354 
355     @Alerts(DEFAULT = "false/false",
356             CHROME = "true/false",
357             EDGE = "true/false")
358     void _RTCPeerConnection_webkitRTCPeerConnection() throws Exception {
359         test("RTCPeerConnection", "webkitRTCPeerConnection");
360     }
361 
362     @Alerts("true/false")
363     void _RTCPeerConnectionIceEvent_RTCPeerConnectionIceEvent() throws Exception {
364         test("RTCPeerConnectionIceEvent", "RTCPeerConnectionIceEvent");
365     }
366 
367     @Alerts("true/false")
368     void _RTCSctpTransport_RTCSctpTransport() throws Exception {
369         test("RTCSctpTransport", "RTCSctpTransport");
370     }
371 
372     @Alerts("false/false")
373     void _RTCSessionDescription_mozRTCSessionDescription() throws Exception {
374         test("RTCSessionDescription", "mozRTCSessionDescription");
375     }
376 
377     @Alerts("true/false")
378     void _RTCSessionDescription_RTCSessionDescription() throws Exception {
379         test("RTCSessionDescription", "RTCSessionDescription");
380     }
381 
382     @Alerts("true/false")
383     void _RTCStatsReport_RTCStatsReport() throws Exception {
384         test("RTCStatsReport", "RTCStatsReport");
385     }
386 
387 }