Jacek Caban : mshtml: Skip tests on old IE as soon as possible.
Module: wine Branch: master Commit: cc8511678dff65fc5cd8f19e970d468e81182ad9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cc8511678dff65fc5cd8f19e97... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Nov 22 20:23:44 2008 +0100 mshtml: Skip tests on old IE as soon as possible. --- dlls/mshtml/tests/dom.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 36d4f2a..8c7a113 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -409,12 +409,21 @@ static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2) static IHTMLDocument2 *create_document(void) { IHTMLDocument2 *doc; + IHTMLDocument5 *doc5; HRESULT hres; hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IHTMLDocument2, (void**)&doc); ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5); + if(FAILED(hres)) { + win_skip("Could not get IHTMLDocument5, probably too old IE\n"); + IHTMLDocument2_Release(doc); + return NULL; + } + + IHTMLDocument5_Release(doc5); return doc; } @@ -3645,6 +3654,9 @@ static void run_domtest(const char *str, domtest_t test) HRESULT hres; doc = create_doc_with_string(str); + if(!doc) + return; + do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) {
participants (1)
-
Alexandre Julliard