From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/msxml3/domdoc.c | 2 ++
dlls/msxml3/tests/domdoc.c | 39 ++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index ddd756582b..0b917c1302 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -73,6 +73,7 @@ static const WCHAR PropValueXSLPatternW[] = {'X','S','L','P','a','t','t','e','r'
static const WCHAR PropertyResolveExternalsW[] = {'R','e','s','o','l','v','e','E','x','t','e','r','n','a','l','s',0};
static const WCHAR PropertyAllowXsltScriptW[] = {'A','l','l','o','w','X','s','l','t','S','c','r','i','p','t',0};
static const WCHAR PropertyAllowDocumentFunctionW[] = {'A','l','l','o','w','D','o','c','u','m','e','n','t','F','u','n','c','t','i','o','n',0};
+static const WCHAR PropertyNormalizeAttributeValuesW[] = {'N','o','r','m','a','l','i','z','e','A','t','t','r','i','b','u','t','e','V','a','l','u','e','s',0};
/* Anything that passes the test_get_ownerDocument()
* tests can go here (data shared between all instances).
@@ -3108,6 +3109,7 @@ static HRESULT WINAPI domdoc_setProperty(
lstrcmpiW(p, PropertyNewParserW) == 0 ||
lstrcmpiW(p, PropertyResolveExternalsW) == 0 ||
lstrcmpiW(p, PropertyAllowXsltScriptW) == 0 ||
+ lstrcmpiW(p, PropertyNormalizeAttributeValuesW) == 0 ||
lstrcmpiW(p, PropertyAllowDocumentFunctionW) == 0)
{
/* Ignore */
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index d5f30fec62..35fa42a6d1 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -12792,6 +12792,44 @@ static void test_transformNodeToObject(void)
free_bstrs();
}
+static void test_normalize_attribute_values(void)
+{
+ IXMLDOMDocument2 *doc;
+ VARIANT var;
+ HRESULT hr;
+
+ if (!is_clsid_supported(&CLSID_DOMDocument60, &IID_IXMLDOMDocument2))
+ {
+ win_skip("NormalizeAttributeValues is not supported.\n");
+ return;
+ }
+
+ doc = create_document_version(60, &IID_IXMLDOMDocument2);
+
+ V_VT(&var) = VT_I2;
+ V_I2(&var) = 10;
+ hr = IXMLDOMDocument2_getProperty(doc, _bstr_("NormalizeAttributeValues"), &var);
+todo_wine {
+ ok(hr == S_OK, "Failed to get property value, hr %#x.\n", hr);
+ ok(V_VT(&var) == VT_BOOL, "Unexpected property value type, vt %d.\n", V_VT(&var));
+ ok(V_BOOL(&var) == VARIANT_FALSE, "Unexpected property value.\n");
+}
+ V_VT(&var) = VT_BOOL;
+ V_BOOL(&var) = VARIANT_TRUE;
+ hr = IXMLDOMDocument2_setProperty(doc, _bstr_("NormalizeAttributeValues"), var);
+ ok(hr == S_OK, "Failed to set property, hr %#x.\n", hr);
+
+ V_VT(&var) = VT_I2;
+ V_I2(&var) = 10;
+ hr = IXMLDOMDocument2_getProperty(doc, _bstr_("NormalizeAttributeValues"), &var);
+todo_wine {
+ ok(hr == S_OK, "Failed to get property value, hr %#x.\n", hr);
+ ok(V_VT(&var) == VT_BOOL, "Unexpected property value type, vt %d.\n", V_VT(&var));
+ ok(V_BOOL(&var) == VARIANT_TRUE, "Unexpected property value.\n");
+}
+ IXMLDOMDocument2_Release(doc);
+}
+
START_TEST(domdoc)
{
HRESULT hr;
@@ -12875,6 +12913,7 @@ START_TEST(domdoc)
test_url();
test_merging_text();
test_transformNodeToObject();
+ test_normalize_attribute_values();
test_xsltemplate();
test_xsltext();
--
2.18.0