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 'F' to 'G'.
29   *
30   * @author Ahmed Ashour
31   * @author Ronald Brill
32   */
33  @RunWith(BrowserParameterizedRunner.class)
34  public class HostParentOfFTest extends HostParentOf {
35  
36      /**
37       * Returns the parameterized data.
38       * @return the parameterized data
39       * @throws Exception if an error occurs
40       */
41      @Parameters
42      public static Collection<Object[]> data() throws Exception {
43          return HostParentOf.data(input -> {
44              final char ch = Character.toUpperCase(input.charAt(0));
45              return ch >= 'F' && ch <= 'G';
46          });
47      }
48  
49      /**
50       * @throws Exception if the test fails
51       */
52      @Test
53      @Alerts(DEFAULT = "false/false",
54              CHROME = "true/false",
55              EDGE = "true/false")
56      public void _FederatedCredential_FederatedCredential() throws Exception {
57          test("FederatedCredential", "FederatedCredential");
58      }
59  
60      /**
61       * @throws Exception if the test fails
62       */
63      @Test
64      @Alerts("true/false")
65      public void _File_File() throws Exception {
66          test("File", "File");
67      }
68  
69      /**
70       * @throws Exception if the test fails
71       */
72      @Test
73      @Alerts("true/false")
74      public void _FileList_FileList() throws Exception {
75          test("FileList", "FileList");
76      }
77  
78      /**
79       * @throws Exception if the test fails
80       */
81      @Test
82      @Alerts("true/false")
83      public void _FileReader_FileReader() throws Exception {
84          test("FileReader", "FileReader");
85      }
86  
87      /**
88       * @throws Exception if the test fails
89       */
90      @Test
91      @Alerts(DEFAULT = "false/false",
92              FF = "true/false",
93              FF_ESR = "true/false")
94      public void _FileSystem_FileSystem() throws Exception {
95          test("FileSystem", "FileSystem");
96      }
97  
98      /**
99       * @throws Exception if the test fails
100      */
101     @Test
102     @Alerts(DEFAULT = "false/false",
103             FF = "true/false",
104             FF_ESR = "true/false")
105     public void _FileSystemDirectoryEntry_FileSystemDirectoryEntry() throws Exception {
106         test("FileSystemDirectoryEntry", "FileSystemDirectoryEntry");
107     }
108 
109     /**
110      * @throws Exception if the test fails
111      */
112     @Test
113     @Alerts(DEFAULT = "false/false",
114             FF = "true/false",
115             FF_ESR = "true/false")
116     public void _FileSystemDirectoryReader_FileSystemDirectoryReader() throws Exception {
117         test("FileSystemDirectoryReader", "FileSystemDirectoryReader");
118     }
119 
120     /**
121      * @throws Exception if the test fails
122      */
123     @Test
124     @Alerts(DEFAULT = "false/false",
125             FF = "true/true",
126             FF_ESR = "true/true")
127     public void _FileSystemEntry_FileSystemDirectoryEntry() throws Exception {
128         test("FileSystemEntry", "FileSystemDirectoryEntry");
129     }
130 
131     /**
132      * @throws Exception if the test fails
133      */
134     @Test
135     @Alerts(DEFAULT = "false/false",
136             FF = "true/false",
137             FF_ESR = "true/false")
138     public void _FileSystemEntry_FileSystemEntry() throws Exception {
139         test("FileSystemEntry", "FileSystemEntry");
140     }
141 
142     /**
143      * @throws Exception if the test fails
144      */
145     @Test
146     @Alerts(DEFAULT = "false/false",
147             FF = "true/true",
148             FF_ESR = "true/true")
149     public void _FileSystemEntry_FileSystemFileEntry() throws Exception {
150         test("FileSystemEntry", "FileSystemFileEntry");
151     }
152 
153     /**
154      * @throws Exception if the test fails
155      */
156     @Test
157     @Alerts(DEFAULT = "false/false",
158             FF = "true/false",
159             FF_ESR = "true/false")
160     public void _FileSystemFileEntry_FileSystemFileEntry() throws Exception {
161         test("FileSystemFileEntry", "FileSystemFileEntry");
162     }
163 
164     /**
165      * @throws Exception if the test fails
166      */
167     @Test
168     @Alerts("true/false")
169     public void _Float32Array_Float32Array() throws Exception {
170         test("Float32Array", "Float32Array");
171     }
172 
173     /**
174      * @throws Exception if the test fails
175      */
176     @Test
177     @Alerts("true/false")
178     public void _Float64Array_Float64Array() throws Exception {
179         test("Float64Array", "Float64Array");
180     }
181 
182     /**
183      * @throws Exception if the test fails
184      */
185     @Test
186     @Alerts("true/false")
187     public void _FocusEvent_FocusEvent() throws Exception {
188         test("FocusEvent", "FocusEvent");
189     }
190 
191     /**
192      * @throws Exception if the test fails
193      */
194     @Test
195     @Alerts("true/false")
196     public void _FontFace_FontFace() throws Exception {
197         test("FontFace", "FontFace");
198     }
199 
200     /**
201      * @throws Exception if the test fails
202      */
203     @Test
204     @Alerts(DEFAULT = "false/false",
205             FF = "true/false",
206             FF_ESR = "true/false")
207     public void _FontFaceSet_FontFaceSet() throws Exception {
208         test("FontFaceSet", "FontFaceSet");
209     }
210 
211     /**
212      * @throws Exception if the test fails
213      */
214     @Test
215     @Alerts("true/false")
216     public void _FormData_FormData() throws Exception {
217         test("FormData", "FormData");
218     }
219 
220     /**
221      * @throws Exception if the test fails
222      */
223     @Test
224     @Alerts("true/false")
225     public void _GainNode_GainNode() throws Exception {
226         test("GainNode", "GainNode");
227     }
228 
229     /**
230      * @throws Exception if the test fails
231      */
232     @Test
233     @Alerts("true/false")
234     public void _Gamepad_Gamepad() throws Exception {
235         test("Gamepad", "Gamepad");
236     }
237 
238     /**
239      * @throws Exception if the test fails
240      */
241     @Test
242     @Alerts("true/false")
243     public void _GamepadButton_GamepadButton() throws Exception {
244         test("GamepadButton", "GamepadButton");
245     }
246 
247     /**
248      * @throws Exception if the test fails
249      */
250     @Test
251     @Alerts("true/false")
252     public void _GamepadEvent_GamepadEvent() throws Exception {
253         test("GamepadEvent", "GamepadEvent");
254     }
255 
256     /**
257      * @throws Exception if the test fails
258      */
259     @Test
260     @Alerts("true/false")
261     public void _Geolocation_Geolocation() throws Exception {
262         test("Geolocation", "Geolocation");
263     }
264 
265     /**
266      * @throws Exception if the test fails
267      */
268     @Test
269     @Alerts("true/false")
270     public void _GeolocationCoordinates_GeolocationCoordinates() throws Exception {
271         test("GeolocationCoordinates", "GeolocationCoordinates");
272     }
273 
274     /**
275      * @throws Exception if the test fails
276      */
277     @Test
278     @Alerts("true/false")
279     public void _GeolocationPosition_GeolocationPosition() throws Exception {
280         test("GeolocationPosition", "GeolocationPosition");
281     }
282 
283     /**
284      * @throws Exception if the test fails
285      */
286     @Test
287     @Alerts("true/false")
288     public void _GeolocationPositionError_GeolocationPositionError() throws Exception {
289         test("GeolocationPositionError", "GeolocationPositionError");
290     }
291 }