mshtml: Added more QueryInterface tests.

This commit is contained in:
Jacek Caban 2007-06-24 21:10:16 +02:00 committed by Alexandre Julliard
parent 1534267ba5
commit d7e75747aa
1 changed files with 14 additions and 3 deletions

View File

@ -3406,12 +3406,23 @@ static void test_StreamLoad(IUnknown *unk)
static void test_QueryInterface(IUnknown *unk) static void test_QueryInterface(IUnknown *unk)
{ {
IRunnableObject *runnable = (IRunnableObject*)0xdeadbeef; IUnknown *qi;
HRESULT hres; HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&runnable); qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(runnable == NULL, "runnable=%p, ezpected NULL\n", runnable); ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode2, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
} }
static void init_test(enum load_state_t ls) { static void init_test(enum load_state_t ls) {