mshtml: Implement IHTMLStyle_get_borderLeft.

This commit is contained in:
Alistair Leslie-Hughes 2009-03-03 22:01:16 +11:00 committed by Alexandre Julliard
parent 53a4e174f9
commit 48cbc036a3
2 changed files with 38 additions and 2 deletions

View File

@ -1414,8 +1414,10 @@ static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
{ {
HTMLStyle *This = HTMLSTYLE_THIS(iface); HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_BORDER_LEFT, p);
} }
static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v) static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)

View File

@ -3395,6 +3395,40 @@ static void test_default_style(IHTMLStyle *style)
ok(hres == S_OK, "put_borderColor failed: %08x\n", hres); ok(hres == S_OK, "put_borderColor failed: %08x\n", hres);
SysFreeString(sDefault); SysFreeString(sDefault);
/* BorderLeft */
hres = IHTMLStyle_get_borderLeft(style, &sDefault);
ok(hres == S_OK, "get_borderLeft failed: %08x\n", hres);
str = a2bstr("thick dotted red");
hres = IHTMLStyle_put_borderLeft(style, str);
ok(hres == S_OK, "put_borderLeft failed: %08x\n", hres);
SysFreeString(str);
/* IHTMLStyle_get_borderLeft appears to have a bug where
it returns the first letter of the color. So we check
each style individually.
*/
V_BSTR(&v) = NULL;
hres = IHTMLStyle_get_borderLeftColor(style, &v);
todo_wine ok(hres == S_OK, "get_borderLeftColor failed: %08x\n", hres);
todo_wine ok(!strcmp_wa(V_BSTR(&v), "red"), "str=%s\n", dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
V_BSTR(&v) = NULL;
hres = IHTMLStyle_get_borderLeftWidth(style, &v);
todo_wine ok(hres == S_OK, "get_borderLeftWidth failed: %08x\n", hres);
todo_wine ok(!strcmp_wa(V_BSTR(&v), "thick"), "str=%s\n", dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
hres = IHTMLStyle_get_borderLeftStyle(style, &str);
ok(hres == S_OK, "get_borderLeftStyle failed: %08x\n", hres);
ok(!strcmp_wa(str, "dotted"), "str=%s\n", dbgstr_w(str));
SysFreeString(str);
hres = IHTMLStyle_put_borderLeft(style, sDefault);
ok(hres == S_OK, "put_borderLeft failed: %08x\n", hres);
SysFreeString(sDefault);
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres); ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {