changeset 11195:653d5bdbfa2a 12+13

8218611: [DRT] fast/xslt tests fails with Unsupported encoding windows-1251 Reviewed-by: mbilla, kcr
author arajkumar
date Wed, 13 Feb 2019 12:03:56 +0530
parents 9ad3ee98867c
children d528ea25c00a
files modules/javafx.web/src/main/native/Source/ThirdParty/libxml/mac/include/libxml/xmlversion.h modules/javafx.web/src/test/java/test/javafx/scene/web/MiscellaneousTest.java
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.web/src/main/native/Source/ThirdParty/libxml/mac/include/libxml/xmlversion.h	Thu Feb 07 19:41:16 2019 +0100
+++ b/modules/javafx.web/src/main/native/Source/ThirdParty/libxml/mac/include/libxml/xmlversion.h	Wed Feb 13 12:03:56 2019 +0530
@@ -282,7 +282,7 @@
  *
  * Whether icu support is available
  */
-#if 0
+#if 1
 #define LIBXML_ICU_ENABLED
 #endif
 
--- a/modules/javafx.web/src/test/java/test/javafx/scene/web/MiscellaneousTest.java	Thu Feb 07 19:41:16 2019 +0100
+++ b/modules/javafx.web/src/test/java/test/javafx/scene/web/MiscellaneousTest.java	Wed Feb 13 12:03:56 2019 +0530
@@ -524,4 +524,19 @@
                     "  </body>\n" +
                     "</html>");
     }
+
+    @Test public void testWindows1251EncodingWithXML() {
+        loadContent(
+            "<script>\n" +
+            "const text = '<?xml version=\"1.0\" encoding=\"windows-1251\"?><test/>';\n" +
+            "const parser = new DOMParser();\n" +
+            "window.xmlDoc = parser.parseFromString(text, 'text/xml');\n" +
+            "</script>"
+        );
+        submit(() -> {
+            // WebKit injects error message into body incase of encoding error, otherwise
+            // body should be null.
+            assertNull(getEngine().executeScript("window.xmlDoc.body"));
+        });
+    }
 }