mshtml: Implement HTMLStyleSheet_get_href().

oldstable
Nikolay Sivov 2014-02-09 17:55:16 +04:00 committed by Alexandre Julliard
parent 1f1d404832
commit 688cc96ee7
2 changed files with 16 additions and 3 deletions

View File

@ -552,8 +552,14 @@ static HRESULT WINAPI HTMLStyleSheet_put_href(IHTMLStyleSheet *iface, BSTR v)
static HRESULT WINAPI HTMLStyleSheet_get_href(IHTMLStyleSheet *iface, BSTR *p)
{
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
nsAString href_str;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&href_str, NULL);
nsres = nsIDOMCSSStyleSheet_GetHref(This->nsstylesheet, &href_str);
return return_nsstr(nsres, &href_str, p);
}
static HRESULT WINAPI HTMLStyleSheet_get_type(IHTMLStyleSheet *iface, BSTR *p)

View File

@ -5958,6 +5958,7 @@ static void test_stylesheet(IDispatch *disp)
IHTMLStyleSheetRulesCollection *col = NULL;
IHTMLStyleSheet *stylesheet;
HRESULT hres;
BSTR href;
test_disp2((IUnknown*)disp, &DIID_DispHTMLStyleSheet, &IID_IHTMLStyleSheet, "[object]");
@ -5967,8 +5968,14 @@ static void test_stylesheet(IDispatch *disp)
hres = IHTMLStyleSheet_get_rules(stylesheet, &col);
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
ok(col != NULL, "col == NULL\n");
IHTMLStyleSheetRulesCollection_Release(col);
href = (void*)0xdeadbeef;
hres = IHTMLStyleSheet_get_href(stylesheet, &href);
ok(hres == S_OK, "get_href failed: %08x\n", hres);
ok(href == NULL, "got href != NULL\n");
SysFreeString(href);
IHTMLStyleSheet_Release(stylesheet);
}