Commit 688cc96e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mshtml: Implement HTMLStyleSheet_get_href().

parent 1f1d4048
......@@ -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)
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment