mshtml: Add IHTMLElementBody test.

This commit is contained in:
Alistair Leslie-Hughes 2008-09-03 13:15:18 +10:00 committed by Alexandre Julliard
parent aee6a2d8e1
commit b5be64db6b
1 changed files with 10 additions and 0 deletions

View File

@ -237,6 +237,10 @@ static IHTMLDocument2 *create_and_load_doc(const char *str)
ULONG ref;
MSG msg;
HRESULT hres;
static const WCHAR ucPtr[] = {'b','a','c','k','g','r','o','u','n','d',0};
DISPID dispID = -1;
OLECHAR *name;
doc = create_doc_with_string(str);
do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink);
@ -256,6 +260,12 @@ static IHTMLDocument2 *create_and_load_doc(const char *str)
return NULL;
}
/* Check we can query for function on the IHTMLElementBody interface */
name = (WCHAR*)ucPtr;
hres = IHTMLElement_GetIDsOfNames(body, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispID);
ok(hres == S_OK, "GetIDsOfNames(background) failed %08x\n", hres);
ok(dispID == DISPID_IHTMLBODYELEMENT_BACKGROUND, "Incorrect dispID got (%d)\n", dispID);
IHTMLElement_Release(body);
return doc;
}