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.BrowserParameterizedRunner;
20  import org.htmlunit.junit.annotation.Alerts;
21  import org.junit.Test;
22  import org.junit.runner.RunWith;
23  import org.junit.runners.Parameterized.Parameters;
24  
25  /**
26   * Tests two Host classes, if one prototype is parent of another.
27   *
28   * This class handles all host names which starts by character 'P' to 'R'.
29   *
30   * @author Ahmed Ashour
31   * @author Ronald Brill
32   */
33  @RunWith(BrowserParameterizedRunner.class)
34  public class HostParentOfPTest extends HostParentOf {
35  
36      /**
37       * Returns the parameterized data.
38       *
39       * @return the parameterized data
40       * @throws Exception
41       *             if an error occurs
42       */
43      @Parameters
44      public static Collection<Object[]> data() throws Exception {
45          return HostParentOf.data(input -> {
46              final char ch = Character.toUpperCase(input.charAt(0));
47              return ch >= 'P' && ch <= 'R';
48          });
49      }
50  
51      /**
52       * @throws Exception
53       *             if the test fails
54       */
55      @Test
56      @Alerts("true/false")
57      public void _PageTransitionEvent_PageTransitionEvent() throws Exception {
58          test("PageTransitionEvent", "PageTransitionEvent");
59      }
60  
61      /**
62       * @throws Exception
63       *             if the test fails
64       */
65      @Test
66      @Alerts("true/false")
67      public void _PannerNode_PannerNode() throws Exception {
68          test("PannerNode", "PannerNode");
69      }
70  
71      /**
72       * @throws Exception if the test fails
73       */
74      @Test
75      @Alerts(DEFAULT = "false/false",
76              CHROME = "true/false",
77              EDGE = "true/false")
78      public void _PasswordCredential_PasswordCredential() throws Exception {
79          test("PasswordCredential", "PasswordCredential");
80      }
81  
82      /**
83       * @throws Exception
84       *             if the test fails
85       */
86      @Test
87      @Alerts("true/false")
88      public void _Path2D_Path2D() throws Exception {
89          test("Path2D", "Path2D");
90      }
91  
92      /**
93       * @throws Exception
94       *             if the test fails
95       */
96      @Test
97      @Alerts(DEFAULT = "false/false",
98              CHROME = "true/false",
99              EDGE = "true/false")
100     public void _PaymentAddress_PaymentAddress() throws Exception {
101         test("PaymentAddress", "PaymentAddress");
102     }
103 
104     /**
105      * @throws Exception
106      *             if the test fails
107      */
108     @Test
109     @Alerts(DEFAULT = "false/false",
110             CHROME = "true/false",
111             EDGE = "true/false")
112     public void _PaymentRequest_PaymentRequest() throws Exception {
113         test("PaymentRequest", "PaymentRequest");
114     }
115 
116     /**
117      * @throws Exception
118      *             if the test fails
119      */
120     @Test
121     @Alerts(DEFAULT = "false/false",
122             CHROME = "true/false",
123             EDGE = "true/false")
124     public void _PaymentResponse_PaymentResponse() throws Exception {
125         test("PaymentResponse", "PaymentResponse");
126     }
127 
128     /**
129      * @throws Exception
130      *             if the test fails
131      */
132     @Test
133     @Alerts("true/false")
134     public void _Performance_Performance() throws Exception {
135         test("Performance", "Performance");
136     }
137 
138     /**
139      * @throws Exception
140      *             if the test fails
141      */
142     @Test
143     @Alerts("true/false")
144     public void _PerformanceEntry_PerformanceEntry() throws Exception {
145         test("PerformanceEntry", "PerformanceEntry");
146     }
147 
148     /**
149      * @throws Exception
150      *             if the test fails
151      */
152     @Test
153     @Alerts("true/true")
154     public void _PerformanceEntry_PerformanceMark() throws Exception {
155         test("PerformanceEntry", "PerformanceMark");
156     }
157 
158     /**
159      * @throws Exception
160      *             if the test fails
161      */
162     @Test
163     @Alerts("true/true")
164     public void _PerformanceEntry_PerformanceMeasure() throws Exception {
165         test("PerformanceEntry", "PerformanceMeasure");
166     }
167 
168     /**
169      * @throws Exception
170      *             if the test fails
171      */
172     @Test
173     @Alerts("true/false")
174     public void _PerformanceEntry_PerformanceNavigationTiming() throws Exception {
175         test("PerformanceEntry", "PerformanceNavigationTiming");
176     }
177 
178     /**
179      * @throws Exception
180      *             if the test fails
181      */
182     @Test
183     @Alerts("true/true")
184     public void _PerformanceEntry_PerformanceResourceTiming() throws Exception {
185         test("PerformanceEntry", "PerformanceResourceTiming");
186     }
187 
188     /**
189      * @throws Exception
190      *             if the test fails
191      */
192     @Test
193     @Alerts("true/false")
194     public void _PerformanceMark_PerformanceMark() throws Exception {
195         test("PerformanceMark", "PerformanceMark");
196     }
197 
198     /**
199      * @throws Exception
200      *             if the test fails
201      */
202     @Test
203     @Alerts("true/false")
204     public void _PerformanceMeasure_PerformanceMeasure() throws Exception {
205         test("PerformanceMeasure", "PerformanceMeasure");
206     }
207 
208     /**
209      * @throws Exception
210      *             if the test fails
211      */
212     @Test
213     @Alerts("true/false")
214     public void _PerformanceNavigation_PerformanceNavigation() throws Exception {
215         test("PerformanceNavigation", "PerformanceNavigation");
216     }
217 
218     /**
219      * @throws Exception if the test fails
220      */
221     @Test
222     @Alerts("true/false")
223     public void _PerformanceNavigationTiming_PerformanceNavigationTiming() throws Exception {
224         test("PerformanceNavigationTiming", "PerformanceNavigationTiming");
225     }
226 
227     /**
228      * @throws Exception
229      *             if the test fails
230      */
231     @Test
232     @Alerts("true/false")
233     public void _PerformanceObserver_PerformanceObserver() throws Exception {
234         test("PerformanceObserver", "PerformanceObserver");
235     }
236 
237     /**
238      * @throws Exception
239      *             if the test fails
240      */
241     @Test
242     @Alerts("true/false")
243     public void _PerformanceObserverEntryList_PerformanceObserverEntryList() throws Exception {
244         test("PerformanceObserverEntryList", "PerformanceObserverEntryList");
245     }
246 
247     /**
248      * @throws Exception
249      *             if the test fails
250      */
251     @Test
252     @Alerts("true/true")
253     public void _PerformanceResourceTiming_PerformanceNavigationTiming() throws Exception {
254         test("PerformanceResourceTiming", "PerformanceNavigationTiming");
255     }
256 
257     /**
258      * @throws Exception
259      *             if the test fails
260      */
261     @Test
262     @Alerts("true/false")
263     public void _PerformanceResourceTiming_PerformanceResourceTiming() throws Exception {
264         test("PerformanceResourceTiming", "PerformanceResourceTiming");
265     }
266 
267     /**
268      * @throws Exception
269      *             if the test fails
270      */
271     @Test
272     @Alerts("true/false")
273     public void _PerformanceTiming_PerformanceTiming() throws Exception {
274         test("PerformanceTiming", "PerformanceTiming");
275     }
276 
277     /**
278      * @throws Exception
279      *             if the test fails
280      */
281     @Test
282     @Alerts(DEFAULT = "false/false",
283             CHROME = "true/false",
284             EDGE = "true/false")
285     public void _PeriodicSyncManager_PeriodicSyncManager() throws Exception {
286         test("PeriodicSyncManager", "PeriodicSyncManager");
287     }
288 
289     /**
290      * @throws Exception
291      *             if the test fails
292      */
293     @Test
294     @Alerts("true/false")
295     public void _PeriodicWave_PeriodicWave() throws Exception {
296         test("PeriodicWave", "PeriodicWave");
297     }
298 
299     /**
300      * @throws Exception
301      *             if the test fails
302      */
303     @Test
304     @Alerts("true/false")
305     public void _Permissions_Permissions() throws Exception {
306         test("Permissions", "Permissions");
307     }
308 
309     /**
310      * @throws Exception
311      *             if the test fails
312      */
313     @Test
314     @Alerts("true/false")
315     public void _PermissionStatus_PermissionStatus() throws Exception {
316         test("PermissionStatus", "PermissionStatus");
317     }
318 
319     /**
320      * @throws Exception
321      *             if the test fails
322      */
323     @Test
324     @Alerts("true/false")
325     public void _Plugin_Plugin() throws Exception {
326         test("Plugin", "Plugin");
327     }
328 
329     /**
330      * @throws Exception
331      *             if the test fails
332      */
333     @Test
334     @Alerts("true/false")
335     public void _PluginArray_PluginArray() throws Exception {
336         test("PluginArray", "PluginArray");
337     }
338 
339     /**
340      * @throws Exception
341      *             if the test fails
342      */
343     @Test
344     @Alerts("true/false")
345     public void _PointerEvent_PointerEvent() throws Exception {
346         test("PointerEvent", "PointerEvent");
347     }
348 
349     /**
350      * @throws Exception
351      *             if the test fails
352      */
353     @Test
354     @Alerts("true/false")
355     public void _PopStateEvent_PopStateEvent() throws Exception {
356         test("PopStateEvent", "PopStateEvent");
357     }
358 
359     /**
360      * @throws Exception
361      *             if the test fails
362      */
363     @Test
364     @Alerts("false/false")
365     public void _Position_Position() throws Exception {
366         test("Position", "Position");
367     }
368 
369     /**
370      * @throws Exception
371      *             if the test fails
372      */
373     @Test
374     @Alerts("false/false")
375     public void _PositionError_PositionError() throws Exception {
376         test("PositionError", "PositionError");
377     }
378 
379     /**
380      * @throws Exception if the test fails
381      */
382     @Test
383     @Alerts(DEFAULT = "false/false",
384             CHROME = "true/false",
385             EDGE = "true/false")
386     public void _Presentation_Presentation() throws Exception {
387         test("Presentation", "Presentation");
388     }
389 
390     /**
391      * @throws Exception if the test fails
392      */
393     @Test
394     @Alerts(DEFAULT = "false/false",
395             CHROME = "true/false",
396             EDGE = "true/false")
397     public void _PresentationAvailability_PresentationAvailability() throws Exception {
398         test("PresentationAvailability", "PresentationAvailability");
399     }
400 
401     /**
402      * @throws Exception if the test fails
403      */
404     @Test
405     @Alerts(DEFAULT = "false/false",
406             CHROME = "true/false",
407             EDGE = "true/false")
408     public void _PresentationConnection_PresentationConnection() throws Exception {
409         test("PresentationConnection", "PresentationConnection");
410     }
411 
412     /**
413      * @throws Exception if the test fails
414      */
415     @Test
416     @Alerts(DEFAULT = "false/false",
417             CHROME = "true/false",
418             EDGE = "true/false")
419     public void _PresentationConnectionAvailableEvent_PresentationConnectionAvailableEvent() throws Exception {
420         test("PresentationConnectionAvailableEvent", "PresentationConnectionAvailableEvent");
421     }
422 
423     /**
424      * @throws Exception if the test fails
425      */
426     @Test
427     @Alerts(DEFAULT = "false/false",
428             CHROME = "true/false",
429             EDGE = "true/false")
430     public void _PresentationConnectionCloseEvent_PresentationConnectionCloseEvent() throws Exception {
431         test("PresentationConnectionCloseEvent", "PresentationConnectionCloseEvent");
432     }
433 
434     /**
435      * @throws Exception if the test fails
436      */
437     @Test
438     @Alerts(DEFAULT = "false/false",
439             CHROME = "true/false",
440             EDGE = "true/false")
441     public void _PresentationRequest_PresentationRequest() throws Exception {
442         test("PresentationRequest", "PresentationRequest");
443     }
444 
445     /**
446      * @throws Exception
447      *             if the test fails
448      */
449     @Test
450     @Alerts("true/false")
451     public void _ProcessingInstruction_ProcessingInstruction() throws Exception {
452         test("ProcessingInstruction", "ProcessingInstruction");
453     }
454 
455     /**
456      * @throws Exception
457      *             if the test fails
458      */
459     @Test
460     @Alerts("true/false")
461     public void _ProgressEvent_ProgressEvent() throws Exception {
462         test("ProgressEvent", "ProgressEvent");
463     }
464 
465     /**
466      * @throws Exception
467      *             if the test fails
468      */
469     @Test
470     @Alerts("true/false")
471     public void _Promise_Promise() throws Exception {
472         test("Promise", "Promise");
473     }
474 
475     /**
476      * @throws Exception if the test fails
477      */
478     @Test
479     @Alerts("true/false")
480     public void _PromiseRejectionEvent_PromiseRejectionEvent() throws Exception {
481         test("PromiseRejectionEvent", "PromiseRejectionEvent");
482     }
483 
484     /**
485      * @throws Exception
486      *             if the test fails
487      */
488     @Test
489     @Alerts("true/false")
490     public void _PushManager_PushManager() throws Exception {
491         test("PushManager", "PushManager");
492     }
493 
494     /**
495      * @throws Exception
496      *             if the test fails
497      */
498     @Test
499     @Alerts("true/false")
500     public void _PushSubscription_PushSubscription() throws Exception {
501         test("PushSubscription", "PushSubscription");
502     }
503 
504     /**
505      * @throws Exception if the test fails
506      */
507     @Test
508     @Alerts("true/false")
509     public void _PushSubscriptionOptions_PushSubscriptionOptions() throws Exception {
510         test("PushSubscriptionOptions", "PushSubscriptionOptions");
511     }
512 
513     /**
514      * @throws Exception
515      *             if the test fails
516      */
517     @Test
518     @Alerts("true/false")
519     public void _RadioNodeList_RadioNodeList() throws Exception {
520         test("RadioNodeList", "RadioNodeList");
521     }
522 
523     /**
524      * @throws Exception
525      *             if the test fails
526      */
527     @Test
528     @Alerts("true/false")
529     public void _Range_Range() throws Exception {
530         test("Range", "Range");
531     }
532 
533     /**
534      * @throws Exception
535      *             if the test fails
536      */
537     @Test
538     @Alerts("true/false")
539     public void _ReadableStream_ReadableStream() throws Exception {
540         test("ReadableStream", "ReadableStream");
541     }
542 
543     /**
544      * @throws Exception if the test fails
545      */
546     @Test
547     @Alerts(DEFAULT = "false/false",
548             CHROME = "true/false",
549             EDGE = "true/false")
550     public void _RemotePlayback_RemotePlayback() throws Exception {
551         test("RemotePlayback", "RemotePlayback");
552     }
553 
554     /**
555      * @throws Exception
556      *             if the test fails
557      */
558     @Test
559     @Alerts("true/false")
560     public void _Request_Request() throws Exception {
561         test("Request", "Request");
562     }
563 
564     /**
565      * @throws Exception
566      *             if the test fails
567      */
568     @Test
569     @Alerts("true/false")
570     public void _Response_Response() throws Exception {
571         test("Response", "Response");
572     }
573 
574     /**
575      * @throws Exception if the test fails
576      */
577     @Test
578     @Alerts("true/false")
579     public void _RTCCertificate_RTCCertificate() throws Exception {
580         test("RTCCertificate", "RTCCertificate");
581     }
582 
583     /**
584      * @throws Exception
585      *             if the test fails
586      */
587     @Test
588     @Alerts("true/false")
589     public void _RTCDataChannelEvent_RTCDataChannelEvent() throws Exception {
590         test("RTCDataChannelEvent", "RTCDataChannelEvent");
591     }
592 
593     /**
594      * @throws Exception
595      *             if the test fails
596      */
597     @Test
598     @Alerts("false/false")
599     public void _RTCIceCandidate_mozRTCIceCandidate() throws Exception {
600         test("RTCIceCandidate", "mozRTCIceCandidate");
601     }
602 
603     /**
604      * @throws Exception
605      *             if the test fails
606      */
607     @Test
608     @Alerts("true/false")
609     public void _RTCIceCandidate_RTCIceCandidate() throws Exception {
610         test("RTCIceCandidate", "RTCIceCandidate");
611     }
612 
613     /**
614      * @throws Exception if the test fails
615      */
616     @Test
617     @Alerts("false/false")
618     public void _RTCPeerConnection_mozRTCPeerConnection() throws Exception {
619         test("RTCPeerConnection", "mozRTCPeerConnection");
620     }
621 
622     /**
623      * @throws Exception if the test fails
624      */
625     @Test
626     @Alerts("true/false")
627     public void _RTCPeerConnection_RTCPeerConnection() throws Exception {
628         test("RTCPeerConnection", "RTCPeerConnection");
629     }
630 
631     /**
632      * @throws Exception if the test fails
633      */
634     @Test
635     @Alerts(DEFAULT = "false/false",
636             CHROME = "true/false",
637             EDGE = "true/false")
638     public void _RTCPeerConnection_webkitRTCPeerConnection() throws Exception {
639         test("RTCPeerConnection", "webkitRTCPeerConnection");
640     }
641 
642     /**
643      * @throws Exception
644      *             if the test fails
645      */
646     @Test
647     @Alerts("true/false")
648     public void _RTCPeerConnectionIceEvent_RTCPeerConnectionIceEvent() throws Exception {
649         test("RTCPeerConnectionIceEvent", "RTCPeerConnectionIceEvent");
650     }
651 
652     /**
653      * @throws Exception if the test fails
654      */
655     @Test
656     @Alerts("true/false")
657     public void _RTCSctpTransport_RTCSctpTransport() throws Exception {
658         test("RTCSctpTransport", "RTCSctpTransport");
659     }
660 
661     /**
662      * @throws Exception if the test fails
663      */
664     @Test
665     @Alerts("false/false")
666     public void _RTCSessionDescription_mozRTCSessionDescription() throws Exception {
667         test("RTCSessionDescription", "mozRTCSessionDescription");
668     }
669 
670     /**
671      * @throws Exception
672      *             if the test fails
673      */
674     @Test
675     @Alerts("true/false")
676     public void _RTCSessionDescription_RTCSessionDescription() throws Exception {
677         test("RTCSessionDescription", "RTCSessionDescription");
678     }
679 
680     /**
681      * @throws Exception if the test fails
682      */
683     @Test
684     @Alerts("true/false")
685     public void _RTCStatsReport_RTCStatsReport() throws Exception {
686         test("RTCStatsReport", "RTCStatsReport");
687     }
688 
689 }