mshtml: Added IHTMLDocument::get_charset implementation.
This commit is contained in:
parent
514e65c1e9
commit
efb08f261d
|
@ -729,8 +729,19 @@ static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v)
|
|||
static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p)
|
||||
{
|
||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
nsAString charset_str;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!This->doc_node->nsdoc) {
|
||||
FIXME("NULL nsdoc\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
nsAString_Init(&charset_str, NULL);
|
||||
nsres = nsIDOMHTMLDocument_GetCharacterSet(This->doc_node->nsdoc, &charset_str);
|
||||
return return_nsstr(nsres, &charset_str, p);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v)
|
||||
|
|
|
@ -4745,6 +4745,7 @@ static void test_defaults(IHTMLDocument2 *doc)
|
|||
IHTMLElement2 *elem2;
|
||||
IHTMLElement *elem;
|
||||
IHTMLStyle *style;
|
||||
BSTR str;
|
||||
LONG l;
|
||||
HRESULT hres;
|
||||
IHTMLElementCollection *collection;
|
||||
|
@ -4819,6 +4820,12 @@ static void test_defaults(IHTMLDocument2 *doc)
|
|||
test_ifaces((IUnknown*)style, style_iids);
|
||||
IHTMLStyle_Release(style);
|
||||
|
||||
str = NULL;
|
||||
hres = IHTMLDocument2_get_charset(doc, &str);
|
||||
ok(hres == S_OK, "get_charset failed: %08x\n", hres);
|
||||
ok(str && *str, "charset is empty"); /* FIXME: better tests */
|
||||
SysFreeString(str);
|
||||
|
||||
test_window(doc);
|
||||
test_compatmode(doc);
|
||||
test_location(doc);
|
||||
|
|
Loading…
Reference in New Issue