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.encoding;
16  
17  import static java.nio.charset.StandardCharsets.ISO_8859_1;
18  import static java.nio.charset.StandardCharsets.UTF_8;
19  import static org.junit.Assert.assertArrayEquals;
20  
21  import java.io.ByteArrayOutputStream;
22  import java.net.URL;
23  import java.nio.charset.Charset;
24  import java.nio.charset.StandardCharsets;
25  import java.util.ArrayList;
26  import java.util.Collection;
27  import java.util.List;
28  import java.util.zip.GZIPOutputStream;
29  
30  import org.apache.commons.io.ByteOrderMark;
31  import org.apache.commons.lang3.ArrayUtils;
32  import org.htmlunit.MiniServer;
33  import org.htmlunit.WebDriverTestCase;
34  import org.htmlunit.WebTestCase;
35  import org.htmlunit.html.HtmlScript;
36  import org.htmlunit.junit.BrowserParameterizedRunner;
37  import org.htmlunit.junit.BrowserParameterizedRunner.Default;
38  import org.htmlunit.junit.annotation.Alerts;
39  import org.htmlunit.junit.annotation.HtmlUnitNYI;
40  import org.htmlunit.util.MimeType;
41  import org.htmlunit.util.NameValuePair;
42  import org.junit.Test;
43  import org.junit.runner.RunWith;
44  import org.junit.runners.Parameterized.Parameter;
45  import org.junit.runners.Parameterized.Parameters;
46  import org.openqa.selenium.JavascriptExecutor;
47  import org.openqa.selenium.WebDriver;
48  import org.openqa.selenium.WebDriverException;
49  
50  /**
51   * Tests encoding handling for {@link HtmlScript}.
52   *
53   * @author Ronald Brill
54   */
55  @RunWith(BrowserParameterizedRunner.class)
56  public class ScriptEncodingTest extends WebDriverTestCase {
57  
58      private static final String BOM_UTF_16LE = "BOMUTF16LE";
59      private static final String BOM_UTF_16BE = "BOMUTF16BE";
60      private static final String BOM_UTF_8 = "BOMUTF8";
61  
62      private enum TestCharset {
63          UTF8("UTF8", UTF_8),
64          ISO88591("ISO88591", ISO_8859_1),
65          GB2312("GB2312", Charset.forName("GB2312"));
66  
67          private final String label_;
68          private final Charset charset_;
69  
70          TestCharset(final String label, final Charset charset) {
71              label_ = label;
72              charset_ = charset;
73          }
74  
75          @Override
76          public String toString() {
77              return label_;
78          }
79  
80          public Charset getCharset() {
81              return charset_;
82          }
83      }
84  
85      /**
86       * Returns the parameterized data.
87       * @return the parameterized data
88       * @throws Exception if an error occurs
89       */
90      @Parameters
91      public static Collection<Object[]> data_false() throws Exception {
92          final List<Object[]> list = new ArrayList<>();
93  
94          final TestCharset[] charsetHtmlResponseHeader =
95                  new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.GB2312};
96          final TestCharset[] charsetAttribute = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
97          final TestCharset[] charsetResponseHeader = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
98          final TestCharset[] charsetResponseEncoding = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
99          final String[] bom = {null, BOM_UTF_8, BOM_UTF_16LE, BOM_UTF_16BE};
100 
101         for (final Object charsetHtml : charsetHtmlResponseHeader) {
102             for (final Object attribute : charsetAttribute) {
103                 for (final Object responseHeader : charsetResponseHeader) {
104                     for (final Object responseEncoding : charsetResponseEncoding) {
105                         for (final Object b : bom) {
106                             list.add(new Object[] {charsetHtml, attribute, responseHeader, responseEncoding, b, false});
107                             list.add(new Object[] {charsetHtml, attribute, responseHeader, responseEncoding, b, true});
108                         }
109                     }
110                 }
111             }
112         }
113         return list;
114     }
115 
116     /**
117      * The charsetHtmlResponseHeader.
118      */
119     @Parameter
120     public TestCharset charsetHtmlResponseHeader_;
121 
122     /**
123      * The charsetAttribute.
124      */
125     @Parameter(1)
126     public TestCharset charsetAttribute_;
127 
128     /**
129      * The charsetResponseHeader.
130      */
131     @Parameter(2)
132     public TestCharset charsetResponseHeader_;
133 
134     /**
135      * The charsetResponseEncoding.
136      */
137     @Parameter(3)
138     public TestCharset charsetResponseEncoding_;
139 
140     /**
141      * The bom.
142      */
143     @Parameter(4)
144     public String bom_;
145 
146     /**
147      * Gzip or not.
148      */
149     @Parameter(5)
150     public boolean gzip_;
151 
152     /**
153      * The default test.
154      * @throws Exception if an error occurs
155      */
156     @Test
157     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
158     @Default
159     public void charset() throws Exception {
160         charset(charsetHtmlResponseHeader_, charsetAttribute_,
161                 charsetResponseHeader_, charsetResponseEncoding_, bom_, gzip_);
162     }
163 
164     private void charset(
165             final TestCharset charsetHtmlResponse,
166             final TestCharset charsetAttribute,
167             final TestCharset charsetResponseHeader,
168             final TestCharset charsetResponseEncoding,
169             final String bom,
170             final boolean gzip) throws Exception {
171 
172         // use always a different url to avoid caching effects
173         final URL scriptUrl = new URL(URL_SECOND, "" + System.currentTimeMillis() + ".js");
174 
175         String html = DOCTYPE_HTML
176             + "<html><head>\n"
177             + "  <script>var logMsg = ''; function log(msg) { logMsg += msg + '\\xA7\\xA7'; }</script>\n"
178             + "  <script type='text/javascript'>window.onerror=function(msg) { log(msg); }</script>"
179             + "  <script src='" + scriptUrl + "'";
180         if (charsetAttribute != null) {
181             html = html + " charset='" + charsetAttribute.getCharset().name().toLowerCase() + "'";
182         }
183         html = html + "></script>\n"
184             + "</head>\n"
185             + "<body>\n"
186             + "</body>\n"
187             + "</html>";
188 
189         String scriptContentType = MimeType.TEXT_JAVASCRIPT;
190         if (charsetResponseHeader != null) {
191             scriptContentType = scriptContentType + "; charset="
192                                     + charsetResponseHeader.getCharset().name().toLowerCase();
193         }
194         final String js = "log('a'); log('ä'); log('أهلاً'); log('мир'); log('房间');";
195 
196         byte[] script = null;
197         if (charsetResponseEncoding == null) {
198             script = js.getBytes(UTF_8);
199         }
200         else {
201             script = js.getBytes(charsetResponseEncoding.getCharset());
202         }
203 
204         if (BOM_UTF_8.equals(bom)) {
205             script = ArrayUtils.addAll(ByteOrderMark.UTF_8.getBytes(), js.getBytes(StandardCharsets.UTF_8));
206         }
207         else if (BOM_UTF_16BE.equals(bom)) {
208             script = ArrayUtils.addAll(ByteOrderMark.UTF_16BE.getBytes(), js.getBytes(StandardCharsets.UTF_16BE));
209         }
210         else if (BOM_UTF_16LE.equals(bom)) {
211             script = ArrayUtils.addAll(ByteOrderMark.UTF_16LE.getBytes(), js.getBytes(StandardCharsets.UTF_16LE));
212         }
213         if (gzip) {
214             final ByteArrayOutputStream bos = new ByteArrayOutputStream();
215             final GZIPOutputStream gout = new GZIPOutputStream(bos);
216             gout.write(script);
217             gout.finish();
218 
219             final List<NameValuePair> headers = new ArrayList<>();
220             headers.add(new NameValuePair("Content-Encoding", "gzip"));
221             getMockWebConnection().setResponse(scriptUrl, bos.toByteArray(), 200, "OK", scriptContentType, headers);
222         }
223         else {
224             getMockWebConnection().setResponse(scriptUrl, script, 200, "OK", scriptContentType, null);
225         }
226 
227         String htmlContentType = MimeType.TEXT_HTML;
228         Charset htmlResponseCharset = ISO_8859_1;
229         if (charsetHtmlResponse != null) {
230             htmlContentType = htmlContentType + "; charset=" + charsetHtmlResponse.getCharset().name();
231             htmlResponseCharset = charsetHtmlResponse.getCharset();
232         }
233 
234         getMockWebConnection().setResponse(URL_FIRST,
235                 html.getBytes(htmlResponseCharset), 200, "OK", htmlContentType, null);
236 
237         expandExpectedAlertsVariables(URL_FIRST);
238         final String[] expectedAlerts = getExpectedAlerts();
239 
240 
241 
242         try (MiniServer miniServer1 = new MiniServer(PORT, getMockWebConnection())) {
243             miniServer1.start();
244 
245             try {
246                 final WebDriver driver = getWebDriver();
247                 driver.get(WebTestCase.URL_FIRST.toExternalForm());
248 
249                 final String logMsg = (String) ((JavascriptExecutor) driver).executeScript("return logMsg;");
250                 final String[] actualAlerts = logMsg.split("§§");
251 
252                 if (actualAlerts.length == 1) {
253                     assertEquals(1, actualAlerts.length);
254 
255                     final String msg = actualAlerts[0];
256                     assertEquals(expectedAlerts[0], "Invalid token");
257                     assertTrue(msg, msg.contains("Invalid or unexpected token")
258                                     || msg.contains("illegal character")
259                                     || msg.contains("Ungültiges Zeichen"));
260                 }
261                 else {
262                     assertArrayEquals(getExpectedAlerts(), actualAlerts);
263                 }
264             }
265             catch (final WebDriverException e) {
266                 if (!e.getCause().getMessage().contains("illegal character")
267                     && !e.getCause().getMessage().contains("is not defined.")) {
268                     throw e;
269                 }
270 
271                 assertTrue(expectedAlerts.length == 1);
272                 final String msg = e.getCause().getMessage();
273                 assertTrue(msg, msg.contains(expectedAlerts[0]));
274             }
275         }
276     }
277 
278     /**
279      * @throws Exception if the test fails
280      */
281     @Test
282     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
283     public void _ISO88591_____false() throws Exception {
284         charset(TestCharset.ISO88591, null, null, null, null, false);
285     }
286 
287     /**
288      * @throws Exception if the test fails
289      */
290     @Test
291     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
292     public void _ISO88591_____true() throws Exception {
293         charset(TestCharset.ISO88591, null, null, null, null, true);
294     }
295 
296     /**
297      * @throws Exception if the test fails
298      */
299     @Test
300     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
301     public void _ISO88591___UTF8__false() throws Exception {
302         charset(TestCharset.ISO88591, null, null, TestCharset.UTF8, null, false);
303     }
304 
305     /**
306      * @throws Exception if the test fails
307      */
308     @Test
309     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
310     public void _ISO88591___UTF8__true() throws Exception {
311         charset(TestCharset.ISO88591, null, null, TestCharset.UTF8, null, true);
312     }
313 
314     /**
315      * @throws Exception if the test fails
316      */
317     @Test
318     @Alerts({"a", "ä", "?????", "???", "??"})
319     public void _ISO88591___ISO88591__false() throws Exception {
320         charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, null, false);
321     }
322 
323     /**
324      * @throws Exception if the test fails
325      */
326     @Test
327     @Alerts({"a", "ä", "?????", "???", "??"})
328     public void _ISO88591___ISO88591__true() throws Exception {
329         charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, null, true);
330     }
331 
332     /**
333      * @throws Exception if the test fails
334      */
335     @Test
336     @Alerts({"a", "�", "?????", "???", "??"})
337     public void _ISO88591__UTF8_ISO88591__false() throws Exception {
338         charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, null, false);
339     }
340 
341     /**
342      * @throws Exception if the test fails
343      */
344     @Test
345     @Alerts({"a", "�", "?????", "???", "??"})
346     public void _ISO88591__UTF8_ISO88591__true() throws Exception {
347         charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, null, true);
348     }
349 
350     /**
351      * @throws Exception if the test fails
352      */
353     @Test
354     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
355     public void _ISO88591__ISO88591___false() throws Exception {
356         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, null, null, false);
357     }
358 
359     /**
360      * @throws Exception if the test fails
361      */
362     @Test
363     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
364     public void _ISO88591__ISO88591___true() throws Exception {
365         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, null, null, true);
366     }
367 
368     /**
369      * @throws Exception if the test fails
370      */
371     @Test
372     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
373     public void _ISO88591__ISO88591_UTF8__false() throws Exception {
374         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, null, false);
375     }
376 
377     /**
378      * @throws Exception if the test fails
379      */
380     @Test
381     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
382     public void _ISO88591__ISO88591_UTF8__true() throws Exception {
383         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, null, true);
384     }
385 
386     /**
387      * @throws Exception if the test fails
388      */
389     @Test
390     @Alerts({"a", "ä", "?????", "???", "??"})
391     public void _ISO88591__ISO88591_ISO88591__false() throws Exception {
392         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
393     }
394 
395     /**
396      * @throws Exception if the test fails
397      */
398     @Test
399     @Alerts({"a", "ä", "?????", "???", "??"})
400     public void _ISO88591__ISO88591_ISO88591__true() throws Exception {
401         charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
402     }
403 
404     /**
405      * @throws Exception if the test fails
406      */
407     @Test
408     @Alerts({"a", "�", "?????", "???", "??"})
409     public void _ISO88591_UTF8__ISO88591__false() throws Exception {
410         charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.ISO88591, null, false);
411     }
412 
413     /**
414      * @throws Exception if the test fails
415      */
416     @Test
417     @Alerts({"a", "�", "?????", "???", "??"})
418     public void _ISO88591_UTF8__ISO88591__true() throws Exception {
419         charset(TestCharset.ISO88591, TestCharset.UTF8, null, TestCharset.ISO88591, null, true);
420     }
421 
422     /**
423      * @throws Exception if the test fails
424      */
425     @Test
426     @Alerts({"a", "�", "?????", "???", "??"})
427     public void _ISO88591_UTF8_UTF8_ISO88591__false() throws Exception {
428         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, false);
429     }
430 
431     /**
432      * @throws Exception if the test fails
433      */
434     @Test
435     @Alerts({"a", "�", "?????", "???", "??"})
436     public void _ISO88591_UTF8_UTF8_ISO88591__true() throws Exception {
437         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, true);
438     }
439 
440     /**
441      * @throws Exception if the test fails
442      */
443     @Test
444     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
445     public void _ISO88591_UTF8_ISO88591___false() throws Exception {
446         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, null, false);
447     }
448 
449     /**
450      * @throws Exception if the test fails
451      */
452     @Test
453     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
454     public void _ISO88591_UTF8_ISO88591___true() throws Exception {
455         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, null, true);
456     }
457 
458     /**
459      * @throws Exception if the test fails
460      */
461     @Test
462     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
463     public void _ISO88591_UTF8_ISO88591_UTF8__false() throws Exception {
464         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, false);
465     }
466 
467     /**
468      * @throws Exception if the test fails
469      */
470     @Test
471     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
472     public void _ISO88591_UTF8_ISO88591_UTF8__true() throws Exception {
473         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, true);
474     }
475 
476     /**
477      * @throws Exception if the test fails
478      */
479     @Test
480     @Alerts({"a", "ä", "?????", "???", "??"})
481     public void _ISO88591_UTF8_ISO88591_ISO88591__false() throws Exception {
482         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
483     }
484 
485     /**
486      * @throws Exception if the test fails
487      */
488     @Test
489     @Alerts({"a", "ä", "?????", "???", "??"})
490     public void _ISO88591_UTF8_ISO88591_ISO88591__true() throws Exception {
491         charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
492     }
493 
494     /**
495      * @throws Exception if the test fails
496      */
497     @Test
498     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
499     public void _ISO88591_ISO88591____false() throws Exception {
500         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, null, false);
501     }
502 
503     /**
504      * @throws Exception if the test fails
505      */
506     @Test
507     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
508     public void _ISO88591_ISO88591____true() throws Exception {
509         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, null, true);
510     }
511 
512     /**
513      * @throws Exception if the test fails
514      */
515     @Test
516     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
517     public void _ISO88591_ISO88591__UTF8__false() throws Exception {
518         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.UTF8, null, false);
519     }
520 
521     /**
522      * @throws Exception if the test fails
523      */
524     @Test
525     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
526     public void _ISO88591_ISO88591__UTF8__true() throws Exception {
527         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.UTF8, null, true);
528     }
529 
530     /**
531      * @throws Exception if the test fails
532      */
533     @Test
534     @Alerts({"a", "ä", "?????", "???", "??"})
535     public void _ISO88591_ISO88591__ISO88591__false() throws Exception {
536         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, null, false);
537     }
538 
539     /**
540      * @throws Exception if the test fails
541      */
542     @Test
543     @Alerts({"a", "ä", "?????", "???", "??"})
544     public void _ISO88591_ISO88591__ISO88591__true() throws Exception {
545         charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, null, true);
546     }
547 
548     /**
549      * @throws Exception if the test fails
550      */
551     @Test
552     @Alerts({"a", "�", "?????", "???", "??"})
553     public void _ISO88591_ISO88591_UTF8_ISO88591__false() throws Exception {
554         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, false);
555     }
556 
557     /**
558      * @throws Exception if the test fails
559      */
560     @Test
561     @Alerts({"a", "�", "?????", "???", "??"})
562     public void _ISO88591_ISO88591_UTF8_ISO88591__true() throws Exception {
563         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, true);
564     }
565 
566     /**
567      * @throws Exception if the test fails
568      */
569     @Test
570     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
571     public void _ISO88591_ISO88591_ISO88591___false() throws Exception {
572         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, null, false);
573     }
574 
575     /**
576      * @throws Exception if the test fails
577      */
578     @Test
579     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
580     public void _ISO88591_ISO88591_ISO88591___true() throws Exception {
581         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, null, true);
582     }
583 
584     /**
585      * @throws Exception if the test fails
586      */
587     @Test
588     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
589     public void _ISO88591_ISO88591_ISO88591_UTF8__false() throws Exception {
590         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, false);
591     }
592 
593     /**
594      * @throws Exception if the test fails
595      */
596     @Test
597     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
598     public void _ISO88591_ISO88591_ISO88591_UTF8__true() throws Exception {
599         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, true);
600     }
601 
602     /**
603      * @throws Exception if the test fails
604      */
605     @Test
606     @Alerts({"a", "ä", "?????", "???", "??"})
607     public void _ISO88591_ISO88591_ISO88591_ISO88591__false() throws Exception {
608         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
609     }
610 
611     /**
612      * @throws Exception if the test fails
613      */
614     @Test
615     @Alerts({"a", "ä", "?????", "???", "??"})
616     public void _ISO88591_ISO88591_ISO88591_ISO88591__true() throws Exception {
617         charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
618     }
619 
620     /**
621      * @throws Exception if the test fails
622      */
623     @Test
624     @Alerts({"a", "ä", "?????", "???", "??"})
625     public void _UTF8_ISO88591_ISO88591_ISO88591__false() throws Exception {
626         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
627     }
628 
629     /**
630      * @throws Exception if the test fails
631      */
632     @Test
633     @Alerts({"a", "ä", "?????", "???", "??"})
634     public void _UTF8_ISO88591_ISO88591_ISO88591__true() throws Exception {
635         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
636     }
637 
638     /**
639      * @throws Exception if the test fails
640      */
641     @Test
642     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
643     public void _UTF8_ISO88591_ISO88591_UTF8__false() throws Exception {
644         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, false);
645     }
646 
647     /**
648      * @throws Exception if the test fails
649      */
650     @Test
651     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
652     public void _UTF8_ISO88591_ISO88591_UTF8__true() throws Exception {
653         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, true);
654     }
655 
656     /**
657      * @throws Exception if the test fails
658      */
659     @Test
660     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
661     public void _UTF8_ISO88591_ISO88591___false() throws Exception {
662         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, null, false);
663     }
664 
665     /**
666      * @throws Exception if the test fails
667      */
668     @Test
669     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
670     public void _UTF8_ISO88591_ISO88591___true() throws Exception {
671         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, null, true);
672     }
673 
674     /**
675      * @throws Exception if the test fails
676      */
677     @Test
678     @Alerts({"a", "�", "?????", "???", "??"})
679     public void _UTF8_ISO88591_UTF8_ISO88591__false() throws Exception {
680         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, false);
681     }
682 
683     /**
684      * @throws Exception if the test fails
685      */
686     @Test
687     @Alerts({"a", "�", "?????", "???", "??"})
688     public void _UTF8_ISO88591_UTF8_ISO88591__true() throws Exception {
689         charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, true);
690     }
691 
692     /**
693      * @throws Exception if the test fails
694      */
695     @Test
696     @Alerts({"a", "ä", "?????", "???", "??"})
697     public void _UTF8_ISO88591__ISO88591__false() throws Exception {
698         charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, null, false);
699     }
700 
701     /**
702      * @throws Exception if the test fails
703      */
704     @Test
705     @Alerts({"a", "ä", "?????", "???", "??"})
706     public void _UTF8_ISO88591__ISO88591__true() throws Exception {
707         charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, null, true);
708     }
709 
710     /**
711      * @throws Exception if the test fails
712      */
713     @Test
714     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
715     public void _UTF8_ISO88591__UTF8__false() throws Exception {
716         charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.UTF8, null, false);
717     }
718 
719     /**
720      * @throws Exception if the test fails
721      */
722     @Test
723     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
724     public void _UTF8_ISO88591__UTF8__true() throws Exception {
725         charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.UTF8, null, true);
726     }
727 
728     /**
729      * @throws Exception if the test fails
730      */
731     @Test
732     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
733     public void _UTF8_ISO88591____false() throws Exception {
734         charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, null, false);
735     }
736 
737     /**
738      * @throws Exception if the test fails
739      */
740     @Test
741     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
742     public void _UTF8_ISO88591____true() throws Exception {
743         charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, null, true);
744     }
745 
746     /**
747      * @throws Exception if the test fails
748      */
749     @Test
750     @Alerts({"a", "ä", "?????", "???", "??"})
751     public void _UTF8_UTF8_ISO88591_ISO88591__false() throws Exception {
752         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
753     }
754 
755     /**
756      * @throws Exception if the test fails
757      */
758     @Test
759     @Alerts({"a", "ä", "?????", "???", "??"})
760     public void _UTF8_UTF8_ISO88591_ISO88591__true() throws Exception {
761         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
762     }
763 
764     /**
765      * @throws Exception if the test fails
766      */
767     @Test
768     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
769     public void _UTF8_UTF8_ISO88591_UTF8__false() throws Exception {
770         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, false);
771     }
772 
773     /**
774      * @throws Exception if the test fails
775      */
776     @Test
777     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
778     public void _UTF8_UTF8_ISO88591_UTF8__true() throws Exception {
779         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, true);
780     }
781 
782     /**
783      * @throws Exception if the test fails
784      */
785     @Test
786     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
787     public void _UTF8_UTF8_ISO88591___false() throws Exception {
788         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, null, false);
789     }
790 
791     /**
792      * @throws Exception if the test fails
793      */
794     @Test
795     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
796     public void _UTF8_UTF8_ISO88591___true() throws Exception {
797         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, null, true);
798     }
799 
800     /**
801      * @throws Exception if the test fails
802      */
803     @Test
804     @Alerts({"a", "�", "?????", "???", "??"})
805     public void _UTF8_UTF8_UTF8_ISO88591__false() throws Exception {
806         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, false);
807     }
808 
809     /**
810      * @throws Exception if the test fails
811      */
812     @Test
813     @Alerts({"a", "�", "?????", "???", "??"})
814     public void _UTF8_UTF8_UTF8_ISO88591__true() throws Exception {
815         charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, true);
816     }
817 
818     /**
819      * @throws Exception if the test fails
820      */
821     @Test
822     @Alerts({"a", "�", "?????", "???", "??"})
823     public void _UTF8_UTF8__ISO88591__false() throws Exception {
824         charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.ISO88591, null, false);
825     }
826 
827     /**
828      * @throws Exception if the test fails
829      */
830     @Test
831     @Alerts({"a", "�", "?????", "???", "??"})
832     public void _UTF8_UTF8__ISO88591__true() throws Exception {
833         charset(TestCharset.UTF8, TestCharset.UTF8, null, TestCharset.ISO88591, null, true);
834     }
835 
836     /**
837      * @throws Exception if the test fails
838      */
839     @Test
840     @Alerts({"a", "ä", "?????", "???", "??"})
841     public void _UTF8__ISO88591_ISO88591__false() throws Exception {
842         charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
843     }
844 
845     /**
846      * @throws Exception if the test fails
847      */
848     @Test
849     @Alerts({"a", "ä", "?????", "???", "??"})
850     public void _UTF8__ISO88591_ISO88591__true() throws Exception {
851         charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
852     }
853 
854     /**
855      * @throws Exception if the test fails
856      */
857     @Test
858     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
859     public void _UTF8__ISO88591_UTF8__false() throws Exception {
860         charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, null, false);
861     }
862 
863     /**
864      * @throws Exception if the test fails
865      */
866     @Test
867     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
868     public void _UTF8__ISO88591_UTF8__true() throws Exception {
869         charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, null, true);
870     }
871 
872     /**
873      * @throws Exception if the test fails
874      */
875     @Test
876     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
877     public void _UTF8__ISO88591___false() throws Exception {
878         charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, null, false);
879     }
880 
881     /**
882      * @throws Exception if the test fails
883      */
884     @Test
885     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
886     public void _UTF8__ISO88591___true() throws Exception {
887         charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, null, true);
888     }
889 
890     /**
891      * @throws Exception if the test fails
892      */
893     @Test
894     @Alerts({"a", "�", "?????", "???", "??"})
895     public void _UTF8__UTF8_ISO88591__false() throws Exception {
896         charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, null, false);
897     }
898 
899     /**
900      * @throws Exception if the test fails
901      */
902     @Test
903     @Alerts({"a", "�", "?????", "???", "??"})
904     public void _UTF8__UTF8_ISO88591__true() throws Exception {
905         charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, null, true);
906     }
907 
908     /**
909      * @throws Exception if the test fails
910      */
911     @Test
912     @Alerts({"a", "�", "?????", "???", "??"})
913     public void _UTF8___ISO88591__false() throws Exception {
914         charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, null, false);
915     }
916 
917     /**
918      * @throws Exception if the test fails
919      */
920     @Test
921     @Alerts({"a", "�", "?????", "???", "??"})
922     public void _UTF8___ISO88591__true() throws Exception {
923         charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, null, true);
924     }
925 
926     /**
927      * @throws Exception if the test fails
928      */
929     @Test
930     @Alerts({"a", "ä", "?????", "???", "??"})
931     public void __ISO88591_ISO88591_ISO88591__false() throws Exception {
932         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
933     }
934 
935     /**
936      * @throws Exception if the test fails
937      */
938     @Test
939     @Alerts({"a", "ä", "?????", "???", "??"})
940     public void __ISO88591_ISO88591_ISO88591__true() throws Exception {
941         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
942     }
943 
944     /**
945      * @throws Exception if the test fails
946      */
947     @Test
948     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
949     public void __ISO88591_ISO88591_UTF8__false() throws Exception {
950         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, false);
951     }
952 
953     /**
954      * @throws Exception if the test fails
955      */
956     @Test
957     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
958     public void __ISO88591_ISO88591_UTF8__true() throws Exception {
959         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, true);
960     }
961 
962     /**
963      * @throws Exception if the test fails
964      */
965     @Test
966     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
967     public void __ISO88591_ISO88591___false() throws Exception {
968         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, null, false);
969     }
970 
971     /**
972      * @throws Exception if the test fails
973      */
974     @Test
975     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
976     public void __ISO88591_ISO88591___true() throws Exception {
977         charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, null, true);
978     }
979 
980     /**
981      * @throws Exception if the test fails
982      */
983     @Test
984     @Alerts({"a", "�", "?????", "???", "??"})
985     public void __ISO88591_UTF8_ISO88591__false() throws Exception {
986         charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, false);
987     }
988 
989     /**
990      * @throws Exception if the test fails
991      */
992     @Test
993     @Alerts({"a", "�", "?????", "???", "??"})
994     public void __ISO88591_UTF8_ISO88591__true() throws Exception {
995         charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, true);
996     }
997 
998     /**
999      * @throws Exception if the test fails
1000      */
1001     @Test
1002     @Alerts({"a", "ä", "?????", "???", "??"})
1003     public void __ISO88591__ISO88591__false() throws Exception {
1004         charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, null, false);
1005     }
1006 
1007     /**
1008      * @throws Exception if the test fails
1009      */
1010     @Test
1011     @Alerts({"a", "ä", "?????", "???", "??"})
1012     public void __ISO88591__ISO88591__true() throws Exception {
1013         charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, null, true);
1014     }
1015 
1016     /**
1017      * @throws Exception if the test fails
1018      */
1019     @Test
1020     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1021     public void __ISO88591__UTF8__false() throws Exception {
1022         charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, null, false);
1023     }
1024 
1025     /**
1026      * @throws Exception if the test fails
1027      */
1028     @Test
1029     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1030     public void __ISO88591__UTF8__true() throws Exception {
1031         charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, null, true);
1032     }
1033 
1034     /**
1035      * @throws Exception if the test fails
1036      */
1037     @Test
1038     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1039     public void __ISO88591____false() throws Exception {
1040         charset(null, TestCharset.ISO88591, null, null, null, false);
1041     }
1042 
1043     /**
1044      * @throws Exception if the test fails
1045      */
1046     @Test
1047     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1048     public void __ISO88591____true() throws Exception {
1049         charset(null, TestCharset.ISO88591, null, null, null, true);
1050     }
1051 
1052     /**
1053      * @throws Exception if the test fails
1054      */
1055     @Test
1056     @Alerts({"a", "ä", "?????", "???", "??"})
1057     public void __UTF8_ISO88591_ISO88591__false() throws Exception {
1058         charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
1059     }
1060 
1061     /**
1062      * @throws Exception if the test fails
1063      */
1064     @Test
1065     @Alerts({"a", "ä", "?????", "???", "??"})
1066     public void __UTF8_ISO88591_ISO88591__true() throws Exception {
1067         charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
1068     }
1069 
1070     /**
1071      * @throws Exception if the test fails
1072      */
1073     @Test
1074     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1075     public void __UTF8_ISO88591_UTF8__false() throws Exception {
1076         charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, false);
1077     }
1078 
1079     /**
1080      * @throws Exception if the test fails
1081      */
1082     @Test
1083     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1084     public void __UTF8_ISO88591_UTF8__true() throws Exception {
1085         charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, true);
1086     }
1087 
1088     /**
1089      * @throws Exception if the test fails
1090      */
1091     @Test
1092     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1093     public void __UTF8_ISO88591___false() throws Exception {
1094         charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, null, false);
1095     }
1096 
1097     /**
1098      * @throws Exception if the test fails
1099      */
1100     @Test
1101     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1102     public void __UTF8_ISO88591___true() throws Exception {
1103         charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, null, true);
1104     }
1105 
1106     /**
1107      * @throws Exception if the test fails
1108      */
1109     @Test
1110     @Alerts({"a", "�", "?????", "???", "??"})
1111     public void __UTF8_UTF8_ISO88591__false() throws Exception {
1112         charset(null, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, false);
1113     }
1114 
1115     /**
1116      * @throws Exception if the test fails
1117      */
1118     @Test
1119     @Alerts({"a", "�", "?????", "???", "??"})
1120     public void __UTF8_UTF8_ISO88591__true() throws Exception {
1121         charset(null, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, true);
1122     }
1123 
1124     /**
1125      * @throws Exception if the test fails
1126      */
1127     @Test
1128     @Alerts({"a", "�", "?????", "???", "??"})
1129     public void __UTF8__ISO88591__false() throws Exception {
1130         charset(null, TestCharset.UTF8, null, TestCharset.ISO88591, null, false);
1131     }
1132 
1133     /**
1134      * @throws Exception if the test fails
1135      */
1136     @Test
1137     @Alerts({"a", "�", "?????", "???", "??"})
1138     public void __UTF8__ISO88591__true() throws Exception {
1139         charset(null, TestCharset.UTF8, null, TestCharset.ISO88591, null, true);
1140     }
1141 
1142     /**
1143      * @throws Exception if the test fails
1144      */
1145     @Test
1146     @Alerts({"a", "ä", "?????", "???", "??"})
1147     public void ___ISO88591_ISO88591__false() throws Exception {
1148         charset(null, null, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
1149     }
1150 
1151     /**
1152      * @throws Exception if the test fails
1153      */
1154     @Test
1155     @Alerts({"a", "ä", "?????", "???", "??"})
1156     public void ___ISO88591_ISO88591__true() throws Exception {
1157         charset(null, null, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
1158     }
1159 
1160     /**
1161      * @throws Exception if the test fails
1162      */
1163     @Test
1164     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1165     public void ___ISO88591_UTF8__false() throws Exception {
1166         charset(null, null, TestCharset.ISO88591, TestCharset.UTF8, null, false);
1167     }
1168 
1169     /**
1170      * @throws Exception if the test fails
1171      */
1172     @Test
1173     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1174     public void ___ISO88591_UTF8__true() throws Exception {
1175         charset(null, null, TestCharset.ISO88591, TestCharset.UTF8, null, true);
1176     }
1177 
1178     /**
1179      * @throws Exception if the test fails
1180      */
1181     @Test
1182     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1183     public void ___ISO88591___false() throws Exception {
1184         charset(null, null, TestCharset.ISO88591, null, null, false);
1185     }
1186 
1187     /**
1188      * @throws Exception if the test fails
1189      */
1190     @Test
1191     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1192     public void ___ISO88591___true() throws Exception {
1193         charset(null, null, TestCharset.ISO88591, null, null, true);
1194     }
1195 
1196     /**
1197      * @throws Exception if the test fails
1198      */
1199     @Test
1200     @Alerts({"a", "ä", "?????", "???", "??"})
1201     public void ___UTF8_ISO88591__false() throws Exception {
1202         charset(null, null, null, TestCharset.ISO88591, null, false);
1203     }
1204 
1205     /**
1206      * @throws Exception if the test fails
1207      */
1208     @Test
1209     @Alerts({"a", "ä", "?????", "???", "??"})
1210     public void ___UTF8_ISO88591__true() throws Exception {
1211         charset(null, null, null, TestCharset.ISO88591, null, true);
1212     }
1213 
1214     /**
1215      * @throws Exception if the test fails
1216      */
1217     @Test
1218     @Alerts({"a", "ä", "?????", "???", "??"})
1219     public void ____ISO88591__false() throws Exception {
1220         charset(null, null, null, TestCharset.ISO88591, null, false);
1221     }
1222 
1223     /**
1224      * @throws Exception if the test fails
1225      */
1226     @Test
1227     @Alerts({"a", "ä", "?????", "???", "??"})
1228     public void ____ISO88591__true() throws Exception {
1229         charset(null, null, null, TestCharset.ISO88591, null, true);
1230     }
1231 
1232     /**
1233      * @throws Exception if the test fails
1234      */
1235     @Test
1236     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1237     @HtmlUnitNYI(CHROME = {"a", "ä", "أهلاً", "мир", "房间"},
1238             EDGE = {"a", "ä", "أهلاً", "мир", "房间"},
1239             FF = {"a", "ä", "أهلاً", "мир", "房间"},
1240             FF_ESR = {"a", "ä", "أهلاً", "мир", "房间"})
1241     public void ____UTF8__false() throws Exception {
1242         charset(null, null, null, TestCharset.UTF8, null, false);
1243     }
1244 
1245     /**
1246      * @throws Exception if the test fails
1247      */
1248     @Test
1249     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1250     @HtmlUnitNYI(CHROME = {"a", "ä", "أهلاً", "мир", "房间"},
1251             EDGE = {"a", "ä", "أهلاً", "мир", "房间"},
1252             FF = {"a", "ä", "أهلاً", "мир", "房间"},
1253             FF_ESR = {"a", "ä", "أهلاً", "мир", "房间"})
1254     public void ____UTF8__true() throws Exception {
1255         charset(null, null, null, TestCharset.UTF8, null, true);
1256     }
1257 
1258     /**
1259      * @throws Exception if the test fails
1260      */
1261     @Test
1262     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1263     @HtmlUnitNYI(CHROME = {"a", "ä", "أهلاً", "мир", "房间"},
1264             EDGE = {"a", "ä", "أهلاً", "мир", "房间"},
1265             FF = {"a", "ä", "أهلاً", "мир", "房间"},
1266             FF_ESR = {"a", "ä", "أهلاً", "мир", "房间"})
1267     public void ______false() throws Exception {
1268         charset(null, null, null, null, null, false);
1269     }
1270 
1271     /**
1272      * @throws Exception if the test fails
1273      */
1274     @Test
1275     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1276     @HtmlUnitNYI(CHROME = {"a", "ä", "أهلاً", "мир", "房间"},
1277             EDGE = {"a", "ä", "أهلاً", "мир", "房间"},
1278             FF = {"a", "ä", "أهلاً", "мир", "房间"},
1279             FF_ESR = {"a", "ä", "أهلاً", "мир", "房间"})
1280     public void ______true() throws Exception {
1281         charset(null, null, null, null, null, true);
1282     }
1283 
1284     /**
1285      * @throws Exception if the test fails
1286      */
1287     @Test
1288     @Alerts({"a", "ä", "?????", "???", "??"})
1289     public void _GB2312_ISO88591_ISO88591_ISO88591__false() throws Exception {
1290         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
1291     }
1292 
1293     /**
1294      * @throws Exception if the test fails
1295      */
1296     @Test
1297     @Alerts({"a", "ä", "?????", "???", "??"})
1298     public void _GB2312_ISO88591_ISO88591_ISO88591__true() throws Exception {
1299         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
1300     }
1301 
1302     /**
1303      * @throws Exception if the test fails
1304      */
1305     @Test
1306     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1307     public void _GB2312_ISO88591_ISO88591_UTF8__false() throws Exception {
1308         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, false);
1309     }
1310 
1311     /**
1312      * @throws Exception if the test fails
1313      */
1314     @Test
1315     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1316     public void _GB2312_ISO88591_ISO88591_UTF8__true() throws Exception {
1317         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, true);
1318     }
1319 
1320     /**
1321      * @throws Exception if the test fails
1322      */
1323     @Test
1324     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1325     public void _GB2312_ISO88591_ISO88591___false() throws Exception {
1326         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, null, false);
1327     }
1328 
1329     /**
1330      * @throws Exception if the test fails
1331      */
1332     @Test
1333     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1334     public void _GB2312_ISO88591_ISO88591___true() throws Exception {
1335         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, null, true);
1336     }
1337 
1338     /**
1339      * @throws Exception if the test fails
1340      */
1341     @Test
1342     @Alerts({"a", "�", "?????", "???", "??"})
1343     public void _GB2312_ISO88591_UTF8_ISO88591__false() throws Exception {
1344         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, false);
1345     }
1346 
1347     /**
1348      * @throws Exception if the test fails
1349      */
1350     @Test
1351     @Alerts({"a", "�", "?????", "???", "??"})
1352     public void _GB2312_ISO88591_UTF8_ISO88591__true() throws Exception {
1353         charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, true);
1354     }
1355 
1356     /**
1357      * @throws Exception if the test fails
1358      */
1359     @Test
1360     @Alerts({"a", "ä", "?????", "???", "??"})
1361     public void _GB2312_ISO88591__ISO88591__false() throws Exception {
1362         charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.ISO88591, null, false);
1363     }
1364 
1365     /**
1366      * @throws Exception if the test fails
1367      */
1368     @Test
1369     @Alerts({"a", "ä", "?????", "???", "??"})
1370     public void _GB2312_ISO88591__ISO88591__true() throws Exception {
1371         charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.ISO88591, null, true);
1372     }
1373 
1374     /**
1375      * @throws Exception if the test fails
1376      */
1377     @Test
1378     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1379     public void _GB2312_ISO88591__UTF8__false() throws Exception {
1380         charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.UTF8, null, false);
1381     }
1382 
1383     /**
1384      * @throws Exception if the test fails
1385      */
1386     @Test
1387     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1388     public void _GB2312_ISO88591__UTF8__true() throws Exception {
1389         charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.UTF8, null, true);
1390     }
1391 
1392     /**
1393      * @throws Exception if the test fails
1394      */
1395     @Test
1396     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1397     public void _GB2312_ISO88591____false() throws Exception {
1398         charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, null, false);
1399     }
1400 
1401     /**
1402      * @throws Exception if the test fails
1403      */
1404     @Test
1405     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1406     public void _GB2312_ISO88591____true() throws Exception {
1407         charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, null, true);
1408     }
1409 
1410     /**
1411      * @throws Exception if the test fails
1412      */
1413     @Test
1414     @Alerts({"a", "ä", "?????", "???", "??"})
1415     public void _GB2312_UTF8_ISO88591_ISO88591__false() throws Exception {
1416         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
1417     }
1418 
1419     /**
1420      * @throws Exception if the test fails
1421      */
1422     @Test
1423     @Alerts({"a", "ä", "?????", "???", "??"})
1424     public void _GB2312_UTF8_ISO88591_ISO88591__true() throws Exception {
1425         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
1426     }
1427 
1428     /**
1429      * @throws Exception if the test fails
1430      */
1431     @Test
1432     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1433     public void _GB2312_UTF8_ISO88591_UTF8__false() throws Exception {
1434         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, false);
1435     }
1436 
1437     /**
1438      * @throws Exception if the test fails
1439      */
1440     @Test
1441     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1442     public void _GB2312_UTF8_ISO88591_UTF8__true() throws Exception {
1443         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, true);
1444     }
1445 
1446     /**
1447      * @throws Exception if the test fails
1448      */
1449     @Test
1450     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1451     public void _GB2312_UTF8_ISO88591___false() throws Exception {
1452         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, null, null, false);
1453     }
1454 
1455     /**
1456      * @throws Exception if the test fails
1457      */
1458     @Test
1459     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1460     public void _GB2312_UTF8_ISO88591___true() throws Exception {
1461         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, null, null, true);
1462     }
1463 
1464     /**
1465      * @throws Exception if the test fails
1466      */
1467     @Test
1468     @Alerts({"a", "�", "?????", "???", "??"})
1469     public void _GB2312_UTF8_UTF8_ISO88591__false() throws Exception {
1470         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, false);
1471     }
1472 
1473     /**
1474      * @throws Exception if the test fails
1475      */
1476     @Test
1477     @Alerts({"a", "�", "?????", "???", "??"})
1478     public void _GB2312_UTF8_UTF8_ISO88591__true() throws Exception {
1479         charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, true);
1480     }
1481 
1482     /**
1483      * @throws Exception if the test fails
1484      */
1485     @Test
1486     @Alerts({"a", "�", "?????", "???", "??"})
1487     public void _GB2312_UTF8__ISO88591__false() throws Exception {
1488         charset(TestCharset.GB2312, TestCharset.UTF8, null, TestCharset.ISO88591, null, false);
1489     }
1490 
1491     /**
1492      * @throws Exception if the test fails
1493      */
1494     @Test
1495     @Alerts({"a", "�", "?????", "???", "??"})
1496     public void _GB2312_UTF8__ISO88591__true() throws Exception {
1497         charset(TestCharset.GB2312, TestCharset.UTF8, null, TestCharset.ISO88591, null, true);
1498     }
1499 
1500     /**
1501      * @throws Exception if the test fails
1502      */
1503     @Test
1504     @Alerts({"a", "ä", "?????", "???", "??"})
1505     public void _GB2312__ISO88591_ISO88591__false() throws Exception {
1506         charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.ISO88591, null, false);
1507     }
1508 
1509     /**
1510      * @throws Exception if the test fails
1511      */
1512     @Test
1513     @Alerts({"a", "ä", "?????", "???", "??"})
1514     public void _GB2312__ISO88591_ISO88591__true() throws Exception {
1515         charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.ISO88591, null, true);
1516     }
1517 
1518     /**
1519      * @throws Exception if the test fails
1520      */
1521     @Test
1522     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1523     public void _GB2312__ISO88591_UTF8__false() throws Exception {
1524         charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.UTF8, null, false);
1525     }
1526 
1527     /**
1528      * @throws Exception if the test fails
1529      */
1530     @Test
1531     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1532     public void _GB2312__ISO88591_UTF8__true() throws Exception {
1533         charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.UTF8, null, true);
1534     }
1535 
1536     /**
1537      * @throws Exception if the test fails
1538      */
1539     @Test
1540     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1541     public void _GB2312__ISO88591___false() throws Exception {
1542         charset(TestCharset.GB2312, null, TestCharset.ISO88591, null, null, false);
1543     }
1544 
1545     /**
1546      * @throws Exception if the test fails
1547      */
1548     @Test
1549     @Alerts({"a", "ä", "أهلاً", "мир", "房间"})
1550     public void _GB2312__ISO88591___true() throws Exception {
1551         charset(TestCharset.GB2312, null, TestCharset.ISO88591, null, null, true);
1552     }
1553 
1554     /**
1555      * @throws Exception if the test fails
1556      */
1557     @Test
1558     @Alerts({"a", "�", "?????", "???", "??"})
1559     public void _GB2312__UTF8_ISO88591__false() throws Exception {
1560         charset(TestCharset.GB2312, null, TestCharset.UTF8, TestCharset.ISO88591, null, false);
1561     }
1562 
1563     /**
1564      * @throws Exception if the test fails
1565      */
1566     @Test
1567     @Alerts({"a", "�", "?????", "???", "??"})
1568     public void _GB2312__UTF8_ISO88591__true() throws Exception {
1569         charset(TestCharset.GB2312, null, TestCharset.UTF8, TestCharset.ISO88591, null, true);
1570     }
1571 
1572     /**
1573      * @throws Exception if the test fails
1574      */
1575     @Test
1576     @Alerts({"a", "�", "?????", "???", "??"})
1577     public void _GB2312___ISO88591__false() throws Exception {
1578         charset(TestCharset.GB2312, null, null, TestCharset.ISO88591, null, false);
1579     }
1580 
1581     /**
1582      * @throws Exception if the test fails
1583      */
1584     @Test
1585     @Alerts({"a", "�", "?????", "???", "??"})
1586     public void _GB2312___ISO88591__true() throws Exception {
1587         charset(TestCharset.GB2312, null, null, TestCharset.ISO88591, null, true);
1588     }
1589 
1590     /**
1591      * @throws Exception if the test fails
1592      */
1593     @Test
1594     @Alerts({"a", "盲", "兀賴賱丕賸", "屑懈褉", "鎴块棿"})
1595     public void _GB2312___UTF8__false() throws Exception {
1596         charset(TestCharset.GB2312, null, null, TestCharset.UTF8, null, false);
1597     }
1598 
1599     /**
1600      * @throws Exception if the test fails
1601      */
1602     @Test
1603     @Alerts({"a", "盲", "兀賴賱丕賸", "屑懈褉", "鎴块棿"})
1604     public void _GB2312___UTF8__true() throws Exception {
1605         charset(TestCharset.GB2312, null, null, TestCharset.UTF8, null, true);
1606     }
1607 
1608     /**
1609      * @throws Exception if the test fails
1610      */
1611     @Test
1612     @Alerts({"a", "盲", "兀賴賱丕賸", "屑懈褉", "鎴块棿"})
1613     public void _GB2312_____false() throws Exception {
1614         charset(TestCharset.GB2312, null, null, null, null, false);
1615     }
1616 
1617     /**
1618      * @throws Exception if the test fails
1619      */
1620     @Test
1621     @Alerts({"a", "盲", "兀賴賱丕賸", "屑懈褉", "鎴块棿"})
1622     public void _GB2312_____true() throws Exception {
1623         charset(TestCharset.GB2312, null, null, null, null, true);
1624     }
1625 }