Module: wine Branch: master Commit: df4bdad94d049444d29cbec95f4a4fd6bc2e6a07 URL: http://source.winehq.org/git/wine.git/?a=commit;h=df4bdad94d049444d29cbec95f...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Oct 7 10:49:04 2007 +0200
mshtml: Skip tests if we can't get body object - it means that there is no Gecko available.
---
dlls/mshtml/tests/dom.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index fefe054..966831e 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -597,8 +597,10 @@ typedef void (*domtest_t)(IHTMLDocument2*); static void run_domtest(const char *str, domtest_t test) { IHTMLDocument2 *doc; + IHTMLElement *body = NULL; ULONG ref; MSG msg; + HRESULT hres;
doc = create_doc_with_string(str); do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); @@ -608,7 +610,15 @@ static void run_domtest(const char *str, domtest_t test) DispatchMessage(&msg); }
- test(doc); + hres = IHTMLDocument2_get_body(doc, &body); + ok(hres == S_OK, "get_body failed: %08x\n", hres); + + if(body) { + IHTMLElement_Release(body); + test(doc); + }else { + skip("Could not get document body. Assuming no Gecko installed.\n"); + }
ref = IHTMLDocument2_Release(doc); ok(!ref, "ref = %d\n", ref);