Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msxml3/domdoc.c | 2 ++ dlls/msxml3/tests/domdoc.c | 23 +++++++++++++++++++++++ 2 files changed, 25 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..3baf89056c 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -4274,6 +4274,8 @@ static void test_IXMLDOMDocument2(void) /* setProperty tests */ ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("askldhfaklsdf"), var), E_FAIL); ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), var), E_FAIL); + r = IXMLDOMDocument2_setProperty(doc2, _bstr_("NormalizeAttributeValues"), var); + todo_wine ok(r == E_FAIL, "got 0x%08x\n", r); ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("alskjdh faklsjd hfk")), E_FAIL); ole_check(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("XSLPattern"))); ole_check(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("XPath"))); @@ -4290,6 +4292,27 @@ static void test_IXMLDOMDocument2(void) r = IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionNamespaces"), var); ok(r == E_FAIL, "got 0x%08x\n", r);
+ if (is_clsid_supported(&CLSID_DOMDocument60, &IID_IXMLDOMDocument2)) + { + IXMLDOMDocument2 *doc3; + doc3 = create_document_version(60, &IID_IXMLDOMDocument2); + + r = IXMLDOMDocument2_getProperty(doc3, _bstr_("NormalizeAttributeValues"), &var); + ok(V_VT(&var) == VT_BOOL, "got vt %d\n", V_VT(&var)); + ok(V_BOOL(&var) == VARIANT_FALSE, "wrong default\n"); + + V_VT(&var) = VT_BOOL; + V_BOOL(&var) = VARIANT_TRUE; + r = IXMLDOMDocument2_setProperty(doc3, _bstr_("NormalizeAttributeValues"), var); + todo_wine ok(r == S_OK, "got 0x%08x\n", r); + + r = IXMLDOMDocument2_getProperty(doc3, _bstr_("NormalizeAttributeValues"), &var); + todo_wine ok(r == S_OK, "got 0x%08x\n", r); + todo_wine ok(V_VT(&var) == VT_BOOL, "got vt %d\n", V_VT(&var)); + todo_wine ok(V_BOOL(&var) == VARIANT_TRUE, "wrong value\n"); + IXMLDOMDocument2_Release( doc3 ); + } + /* contrary to what MSDN claims you can switch back from XPath to XSLPattern */ ole_check(IXMLDOMDocument2_getProperty(doc2, _bstr_("SelectionLanguage"), &var)); expect_eq(V_VT(&var), VT_BSTR, int, "%x");
It doesn't work:
--- domdoc.c:4301: Test failed: got vt 2 0009:fixme:msxml:domdoc_setProperty Ignoring property L"NormalizeAttributeValues", value 0x32fae0 {VT_BOOL: ffffffff} domdoc.c:4307: Test succeeded inside todo block: got 0x00000000 0009:fixme:msxml:domdoc_getProperty Unknown property L"NormalizeAttributeValues" domdoc.c:4311: Test succeeded inside todo block: got vt 11 domdoc.c:4312: Test succeeded inside todo block: wrong value ----