Commit e7906026 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

shdocvw: Implement IWebBrowser2_get_Name.

parent 2536bfd1
......@@ -139,6 +139,13 @@ static IWebBrowser2 *wb;
static HWND container_hwnd, shell_embedding_hwnd;
static BOOL is_downloading = FALSE;
static int strcmp_wa(LPCWSTR strw, const char *stra)
{
CHAR buf[512];
WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL);
return lstrcmpA(stra, buf);
}
static const char *debugstr_guid(REFIID riid)
{
static char buf[50];
......@@ -1588,6 +1595,7 @@ static void test_ie_funcs(IUnknown *unk)
int i;
LONG hwnd;
HRESULT hres;
BSTR sName;
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres);
......@@ -1807,6 +1815,12 @@ static void test_ie_funcs(IUnknown *unk)
hres = IWebBrowser2_get_Application(wb, NULL);
ok(hres == E_POINTER, "get_Application failed: %08x, expected E_POINTER\n", hres);
/* Name */
hres = IWebBrowser2_get_Name(wb, &sName);
ok(hres == S_OK, "getName failed: %08x, expected S_OK\n", hres);
ok(!strcmp_wa(sName, "Microsoft Web Browser Control"), "got '%s', expected 'Microsoft Web Browser Control'\n", wine_dbgstr_w(sName));
SysFreeString(sName);
/* Quit */
hres = IWebBrowser2_Quit(wb);
......
......@@ -530,9 +530,15 @@ static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szPropert
static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
{
static const WCHAR sName[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',\
' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%p)\n", This, Name);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, Name);
*Name = SysAllocString(sName);
return S_OK;
}
static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, LONG *pHWND)
......
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