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 'I' to 'L'.
26   *
27   * @author Ahmed Ashour
28   * @author Ronald Brill
29   */
30  public class HostParentOfITest 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 >= 'I' && ch <= 'L';
43          });
44      }
45  
46      @Alerts("true/false")
47      void _IDBCursor_IDBCursor() throws Exception {
48          test("IDBCursor", "IDBCursor");
49      }
50  
51      @Alerts("true/true")
52      void _IDBCursor_IDBCursorWithValue() throws Exception {
53          test("IDBCursor", "IDBCursorWithValue");
54      }
55  
56      @Alerts("true/false")
57      void _IDBCursorWithValue_IDBCursorWithValue() throws Exception {
58          test("IDBCursorWithValue", "IDBCursorWithValue");
59      }
60  
61      @Alerts("true/false")
62      void _IDBDatabase_IDBDatabase() throws Exception {
63          test("IDBDatabase", "IDBDatabase");
64      }
65  
66      @Alerts("true/false")
67      void _IDBFactory_IDBFactory() throws Exception {
68          test("IDBFactory", "IDBFactory");
69      }
70  
71      @Alerts("true/false")
72      void _IDBIndex_IDBIndex() throws Exception {
73          test("IDBIndex", "IDBIndex");
74      }
75  
76      @Alerts("true/false")
77      void _IDBKeyRange_IDBKeyRange() throws Exception {
78          test("IDBKeyRange", "IDBKeyRange");
79      }
80  
81      @Alerts("false/false")
82      void _IDBMutableFile_IDBMutableFile() throws Exception {
83          test("IDBMutableFile", "IDBMutableFile");
84      }
85  
86      @Alerts("true/false")
87      void _IDBObjectStore_IDBObjectStore() throws Exception {
88          test("IDBObjectStore", "IDBObjectStore");
89      }
90  
91      @Alerts("true/false")
92      void _IDBOpenDBRequest_IDBOpenDBRequest() throws Exception {
93          test("IDBOpenDBRequest", "IDBOpenDBRequest");
94      }
95  
96      @Alerts("true/true")
97      void _IDBRequest_IDBOpenDBRequest() throws Exception {
98          test("IDBRequest", "IDBOpenDBRequest");
99      }
100 
101     @Alerts("true/false")
102     void _IDBRequest_IDBRequest() throws Exception {
103         test("IDBRequest", "IDBRequest");
104     }
105 
106     @Alerts("true/false")
107     void _IDBTransaction_IDBTransaction() throws Exception {
108         test("IDBTransaction", "IDBTransaction");
109     }
110 
111     @Alerts("true/false")
112     void _IDBVersionChangeEvent_IDBVersionChangeEvent() throws Exception {
113         test("IDBVersionChangeEvent", "IDBVersionChangeEvent");
114     }
115 
116     @Alerts("true/false")
117     void _IdleDeadline_IdleDeadline() throws Exception {
118         test("IdleDeadline", "IdleDeadline");
119     }
120 
121     @Alerts("true/false")
122     void _IIRFilterNode_IIRFilterNode() throws Exception {
123         test("IIRFilterNode", "IIRFilterNode");
124     }
125 
126     @Alerts("true/false")
127     void _Image_HTMLImageElement() throws Exception {
128         // although Image != HTMLImageElement, they seem to be synonyms!!!
129         test("Image", "HTMLImageElement");
130     }
131 
132     @Alerts("true/false")
133     void _Image_Image() throws Exception {
134         test("Image", "Image");
135     }
136 
137     @Alerts("true/false")
138     void _ImageBitmap_ImageBitmap() throws Exception {
139         test("ImageBitmap", "ImageBitmap");
140     }
141 
142     @Alerts("true/false")
143     void _ImageBitmapRenderingContext_ImageBitmapRenderingContext() throws Exception {
144         test("ImageBitmapRenderingContext", "ImageBitmapRenderingContext");
145     }
146 
147     @Alerts("true/false")
148     void _ImageData_ImageData() throws Exception {
149         test("ImageData", "ImageData");
150     }
151 
152     @Alerts(DEFAULT = "false/false",
153             CHROME = "true/false",
154             EDGE = "true/false")
155     void _InputDeviceCapabilities_InputDeviceCapabilities() throws Exception {
156         test("InputDeviceCapabilities", "InputDeviceCapabilities");
157     }
158 
159     @Alerts("true/false")
160     void _InputEvent_InputEvent() throws Exception {
161         test("InputEvent", "InputEvent");
162     }
163 
164     @Alerts("false/false")
165     void _InstallTrigger_InstallTrigger() throws Exception {
166         test("InstallTrigger", "InstallTrigger");
167     }
168 
169     @Alerts("true/false")
170     void _Int16Array_Int16Array() throws Exception {
171         test("Int16Array", "Int16Array");
172     }
173 
174     @Alerts("true/false")
175     void _Int32Array_Int32Array() throws Exception {
176         test("Int32Array", "Int32Array");
177     }
178 
179     @Alerts("true/false")
180     void _Int8Array_Int8Array() throws Exception {
181         test("Int8Array", "Int8Array");
182     }
183 
184     @Alerts("true/false")
185     void _IntersectionObserver_IntersectionObserver() throws Exception {
186         test("IntersectionObserver", "IntersectionObserver");
187     }
188 
189     @Alerts("true/false")
190     void _IntersectionObserverEntry_IntersectionObserverEntry() throws Exception {
191         test("IntersectionObserverEntry", "IntersectionObserverEntry");
192     }
193 
194     @Alerts("true/false")
195     void _KeyboardEvent_KeyboardEvent() throws Exception {
196         test("KeyboardEvent", "KeyboardEvent");
197     }
198 
199     @Alerts("true/false")
200     void _KeyframeEffect_KeyframeEffect() throws Exception {
201         test("KeyframeEffect", "KeyframeEffect");
202     }
203 
204     @Alerts("false/false")
205     void _LocalMediaStream_LocalMediaStream() throws Exception {
206         test("LocalMediaStream", "LocalMediaStream");
207     }
208 
209     @Alerts("true/false")
210     void _Location_Location() throws Exception {
211         test("Location", "Location");
212     }
213 }