On 26.12.2015 4:43, Zhenbo Li wrote:
Hello Nikolay,
Thank you for viewing my patch on Christmas.
2015-12-26 6:56 GMT+08:00 Nikolay Sivov bunglehead@gmail.com:
On 25.12.2015 10:30, Zhenbo Li wrote:
+static void test_illegal_xml(IXMLDOMDocument *xmldom)
- last = (void*)0xdeadbeef;
- hres = IXMLDOMDocument_get_lastChild(xmldom, &last);
- ok(hres == S_FALSE, "get_lastChild failed: %08x\n", hres);
- ok(last == NULL, "last != NULL\n");
+}
It makes no sense to test every method on empty tree, test for text string.
I'm not sure that whether Windows will return an empty tree when handling an illegal xml, or being tolerant, return a non-empty tree.
Still, it's enough to check children list length for example.
- hres = IXMLDOMDocument_QueryInterface(xmldoc, &IID_IObjectSafety, (void**)&safety);
- assert(SUCCEEDED(hres));
- hres = IObjectSafety_SetInterfaceSafetyOptions(safety, NULL,
INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER,
INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER);
- assert(SUCCEEDED(hres));
- IObjectSafety_Release(safety);
This looks weird to me, why the asserts? Did Jacek suggest that?
This is discussed before wine 1.8 http://wine.1045685.n5.nabble.com/Re-mshtml-Add-IHTMLXMLHttpRequest-response...
Ok, I'm pretty sure I didn't ask for it myself, but I'll leave it up to Jacek.