mshtml: Skip tests on old IE as soon as possible.
This commit is contained in:
parent
60d12a3adb
commit
cc8511678d
|
@ -409,12 +409,21 @@ static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
|
||||||
static IHTMLDocument2 *create_document(void)
|
static IHTMLDocument2 *create_document(void)
|
||||||
{
|
{
|
||||||
IHTMLDocument2 *doc;
|
IHTMLDocument2 *doc;
|
||||||
|
IHTMLDocument5 *doc5;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||||
&IID_IHTMLDocument2, (void**)&doc);
|
&IID_IHTMLDocument2, (void**)&doc);
|
||||||
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
|
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;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3645,6 +3654,9 @@ static void run_domtest(const char *str, domtest_t test)
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
doc = create_doc_with_string(str);
|
doc = create_doc_with_string(str);
|
||||||
|
if(!doc)
|
||||||
|
return;
|
||||||
|
|
||||||
do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink);
|
do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink);
|
||||||
|
|
||||||
while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) {
|
while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) {
|
||||||
|
|
Loading…
Reference in New Issue