Commit 86f9fce7 authored by Alexandre Julliard's avatar Alexandre Julliard

mshtml/tests: Use the global wine_dbgstr_w instead of a local variant.

parent 89bf94c0
......@@ -201,17 +201,6 @@ static const char *debugstr_guid(REFIID riid)
return buf;
}
static const char *debugstr_w(LPCWSTR str)
{
static char buf[1024];
if(!str)
return "(null)";
WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL);
return buf;
}
#define EXPECT_UPDATEUI 1
#define EXPECT_SETTITLE 2
......@@ -2494,8 +2483,8 @@ static void _test_readyState(unsigned line, IUnknown *unk)
hres = IHTMLDocument2_get_readyState(htmldoc, &state);
ok(hres == S_OK, "get_ReadyState failed: %08x\n", hres);
ok_(__FILE__, line)
(!lstrcmpW(state, expected_state[load_state]), "unexpected state \"%s\", expected %d\n",
debugstr_w(state), load_state);
(!lstrcmpW(state, expected_state[load_state]), "unexpected state %s, expected %d\n",
wine_dbgstr_w(state), load_state);
SysFreeString(state);
dispparams.cArgs = 0;
......@@ -3173,7 +3162,7 @@ static void test_exec_fontname(IUnknown *unk, LPCWSTR name, LPCWSTR exname)
if(V_VT(out) == VT_BSTR) {
if(exname)
ok(!lstrcmpW(V_BSTR(out), name ? name : exname),
"unexpected fontname \"%s\"\n", debugstr_w(name));
"unexpected fontname %s\n", wine_dbgstr_w(name));
else
ok(V_BSTR(out) == NULL, "V_BSTR(out) != NULL\n");
}
......
......@@ -70,13 +70,6 @@ static const WCHAR about_blank_url[] = {'a','b','o','u','t',':','b','l','a','n',
static const WCHAR about_test_url[] = {'a','b','o','u','t',':','t','e','s','t',0};
static const WCHAR about_res_url[] = {'r','e','s',':','b','l','a','n','k',0};
static const char *debugstr_w(LPCWSTR str)
{
static char buf[1024];
WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL);
return buf;
}
static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocolSink, riid)) {
......@@ -278,7 +271,7 @@ static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
len += sizeof(fileW)/sizeof(WCHAR)+1;
ok(len == size, "wrong size %u, expected %u\n", size, len);
ok(!lstrcmpW(url + sizeof(fileW)/sizeof(WCHAR), buf), "wrong file part %s\n", debugstr_w(url));
ok(!lstrcmpW(url + sizeof(fileW)/sizeof(WCHAR), buf), "wrong file part %s\n", wine_dbgstr_w(url));
}
static void test_res_protocol(void)
......
......@@ -109,13 +109,6 @@ static IHTMLDocument2 *notif_doc;
static IDispatchEx *window_dispex;
static BOOL doc_complete;
static const char *debugstr_w(LPCWSTR str)
{
static char buf[1024];
WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL);
return buf;
}
static const char *debugstr_guid(REFIID riid)
{
static char buf[50];
......@@ -240,7 +233,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", debugstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -876,7 +869,7 @@ static HRESULT WINAPI ActiveScript_AddNamedItem(IActiveScript *iface,
CHECK_EXPECT(AddNamedItem);
ok(!lstrcmpW(pstrName, windowW), "pstrName=%s\n", debugstr_w(pstrName));
ok(!lstrcmpW(pstrName, windowW), "pstrName=%s\n", wine_dbgstr_w(pstrName));
ok(dwFlags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS), "dwFlags=%x\n", dwFlags);
hres = IActiveScriptSite_GetItemInfo(site, windowW, SCRIPTINFO_IUNKNOWN, &unk, NULL);
......
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