mshtml: Added semi-stub implementation of IHTMLWindow2::status property.

This commit is contained in:
Jacek Caban 2011-07-31 16:44:43 +02:00 committed by Alexandre Julliard
parent a84870259f
commit b25d49c6c1
2 changed files with 41 additions and 4 deletions

View File

@ -491,15 +491,25 @@ static HRESULT WINAPI HTMLWindow2_get_defaultStatus(IHTMLWindow2 *iface, BSTR *p
static HRESULT WINAPI HTMLWindow2_put_status(IHTMLWindow2 *iface, BSTR v)
{
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
WARN("(%p)->(%s)\n", This, debugstr_w(v));
/*
* FIXME: Since IE7, setting status is blocked, but still possible in certain circumstances.
* Ignoring the call should be enough for us.
*/
return S_OK;
}
static HRESULT WINAPI HTMLWindow2_get_status(IHTMLWindow2 *iface, BSTR *p)
{
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
/* See put_status */
*p = NULL;
return S_OK;
}
static HRESULT WINAPI HTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expression,

View File

@ -1058,6 +1058,31 @@ static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *na
_test_window_name(line, window, name);
}
#define test_window_status(d) _test_window_status(__LINE__,d)
static void _test_window_status(unsigned line, IHTMLWindow2 *window)
{
BSTR status;
HRESULT hres;
status = (void*)0xdeadbeef;
hres = IHTMLWindow2_get_status(window, &status);
ok_(__FILE__,line)(hres == S_OK, "get_status failed: %08x\n", hres);
ok_(__FILE__,line)(!status, "status = %s\n", wine_dbgstr_w(status));
SysFreeString(status);
}
#define set_window_status(w,n) _set_window_status(__LINE__,w,n)
static void _set_window_status(unsigned line, IHTMLWindow2 *window, const char *status)
{
BSTR str;
HRESULT hres;
str = a2bstr(status);
hres = IHTMLWindow2_put_status(window, str);
SysFreeString(str);
ok_(__FILE__,line)(hres == S_OK, "put_status failed: %08x\n", hres);
}
#define test_window_length(w,l) _test_window_length(__LINE__,w,l)
static void _test_window_length(unsigned line, IHTMLWindow2 *window, LONG exlen)
{
@ -4146,6 +4171,8 @@ static void test_window(IHTMLDocument2 *doc)
set_window_name(window, "test");
test_window_length(window, 0);
test_screen(window);
test_window_status(window);
set_window_status(window, "Test!");
IHTMLWindow2_Release(window);
}