Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/mshtml/tests/htmldoc.c | 136 ++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 69 deletions(-)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 2dcc1eecf1..5b21daa6a2 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -238,7 +238,7 @@ static enum load_state_t { } load_state;
static LPCOLESTR expect_status_text = NULL; -static const char *nav_url, *nav_serv_url, *prev_url; +static const WCHAR *nav_url, *nav_serv_url, *prev_url;
static const char html_page[] = "<html>" @@ -283,13 +283,6 @@ static const WCHAR wszTimesNewRoman[] = static const WCHAR wszArial[] = {'A','r','i','a','l',0};
-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 BOOL wstr_contains(const WCHAR *strw, const char *stra) { CHAR buf[512]; @@ -379,7 +372,7 @@ static void test_timer(DWORD flags) static IMoniker Moniker;
#define test_GetCurMoniker(u,m,v,t) _test_GetCurMoniker(__LINE__,u,m,v,t) -static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, const char *exurl, BOOL is_todo) +static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, const WCHAR *exurl, BOOL is_todo) { IHTMLDocument2 *doc; IPersistMoniker *permon; @@ -426,7 +419,8 @@ static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, c if(!*ptr) ok(!lstrcmpW(url, doc_url), "url %s != doc_url %s\n", wine_dbgstr_w(url), wine_dbgstr_w(doc_url)); else - ok(!strcmp_wa(url, nav_serv_url), "url = %s, expected %s\n", wine_dbgstr_w(url), nav_serv_url); + ok(!lstrcmpW(url, nav_serv_url), "url = %s, expected %s\n", wine_dbgstr_w(url), + wine_dbgstr_w(nav_serv_url)); CoTaskMemFree(url); }else if(exurl) { LPOLESTR url; @@ -437,7 +431,7 @@ static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, c ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
todo_wine_if(is_todo) - ok_(__FILE__,line)(!strcmp_wa(url, exurl), "unexpected url %s\n", wine_dbgstr_w(url)); + ok_(__FILE__,line)(!lstrcmpW(url, exurl), "unexpected url %s\n", wine_dbgstr_w(url)); if(!*ptr) ok_(__FILE__,line)(!lstrcmpW(url, doc_url), "url %s != doc_url %s\n", wine_dbgstr_w(url), wine_dbgstr_w(doc_url));
@@ -446,7 +440,7 @@ static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, c ok_(__FILE__,line)(hres == E_UNEXPECTED, "GetCurrentMoniker failed: %08x, expected E_UNEXPECTED\n", hres); ok_(__FILE__,line)(mon == (IMoniker*)0xdeadbeef, "mon=%p\n", mon); - ok_(__FILE__,line)(!strcmp_wa(doc_url, "about:blank"), "doc_url is not about:blank\n"); + ok_(__FILE__,line)(!lstrcmpW(doc_url, L"about:blank"), "doc_url is not about:blank\n"); }
SysFreeString(doc_url); @@ -456,7 +450,7 @@ static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, c }
#define test_current_url(a,b) _test_current_url(__LINE__,a,b) -static void _test_current_url(unsigned line, IUnknown *unk, const char *exurl) +static void _test_current_url(unsigned line, IUnknown *unk, const WCHAR *exurl) { IHTMLDocument2 *doc; BSTR url; @@ -467,7 +461,8 @@ static void _test_current_url(unsigned line, IUnknown *unk, const char *exurl)
hres = IHTMLDocument2_get_URL(doc, &url); ok_(__FILE__,line)(hres == S_OK, "get_URL failed: %08x\n", hres); - ok_(__FILE__,line)(!strcmp_wa(url, exurl), "Unexpected URL %s, expected %s\n", wine_dbgstr_w(url), exurl); + ok_(__FILE__,line)(!lstrcmpW(url, exurl), "Unexpected URL %s, expected %s\n", wine_dbgstr_w(url), + wine_dbgstr_w(exurl)); SysFreeString(url);
IHTMLDocument2_Release(doc); @@ -585,7 +580,7 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, ok(!grfPI, "grfPI = %x\n", grfPI); ok(!dwReserved, "dwReserved = %lx\n", dwReserved); if(is_mhtml) - ok(!strcmp_wa(szUrl, "winetest:doc"), "unexpected URL %s\n", wine_dbgstr_w(szUrl)); + ok(!lstrcmpW(szUrl, L"winetest:doc"), "unexpected URL %s\n", wine_dbgstr_w(szUrl));
memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(bindinfo); @@ -847,7 +842,8 @@ static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPB
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &location); ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); - ok(!strcmp_wa(location, nav_url), "unexpected display name %s, expected %s\n", wine_dbgstr_w(location), nav_url); + ok(!lstrcmpW(location, nav_url), "unexpected display name %s, expected %s\n", wine_dbgstr_w(location), + wine_dbgstr_w(nav_url)); CoTaskMemFree(location); IMoniker_Release(mon);
@@ -915,9 +911,9 @@ static HRESULT WINAPI NewWindowManager_EvaluateNewWindow(INewWindowManager *ifac { CHECK_EXPECT(EvaluateNewWindow);
- ok(!strcmp_wa(pszUrl, "about:blank"), "pszUrl = %s\n", wine_dbgstr_w(pszUrl)); - ok(!strcmp_wa(pszName, "test"), "pszName = %s\n", wine_dbgstr_w(pszName)); - ok(!strcmp_wa(pszUrlContext, prev_url), "pszUrlContext = %s\n", wine_dbgstr_w(pszUrlContext)); + ok(!lstrcmpW(pszUrl, L"about:blank"), "pszUrl = %s\n", wine_dbgstr_w(pszUrl)); + ok(!lstrcmpW(pszName, L"test"), "pszName = %s\n", wine_dbgstr_w(pszName)); + ok(!lstrcmpW(pszUrlContext, prev_url), "pszUrlContext = %s\n", wine_dbgstr_w(pszUrlContext)); ok(!pszFeatures, "pszFeatures = %s\n", wine_dbgstr_w(pszFeatures)); ok(!fReplace, "fReplace = %x\n", fReplace); ok(dwFlags == (allow_new_window ? 0 : NWMF_FIRST), "dwFlags = %x\n", dwFlags); @@ -2643,7 +2639,8 @@ static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, D ok(iface == expect_uihandler_iface, "called on unexpected iface\n"); ok(!dwTranslate, "dwTranslate = %x\n", dwTranslate); todo_wine_if(loading_hash) - ok(!strcmp_wa(pchURLIn, nav_serv_url), "pchURLIn = %s, expected %s\n", wine_dbgstr_w(pchURLIn), nav_serv_url); + ok(!lstrcmpW(pchURLIn, nav_serv_url), "pchURLIn = %s, expected %s\n", wine_dbgstr_w(pchURLIn), + wine_dbgstr_w(nav_serv_url)); ok(ppchURLOut != NULL, "ppchURLOut == NULL\n"); ok(!*ppchURLOut, "*ppchURLOut = %p\n", *ppchURLOut);
@@ -2923,7 +2920,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID if(nav_url) test_GetCurMoniker(doc_unk, NULL, nav_serv_url, FALSE); else if(load_from_stream) - test_GetCurMoniker(doc_unk, NULL, "about:blank", FALSE); + test_GetCurMoniker(doc_unk, NULL, L"about:blank", FALSE); else if(!editmode) test_GetCurMoniker(doc_unk, doc_mon, NULL, FALSE); } @@ -2966,8 +2963,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID CHECK_EXPECT(Exec_ShellDocView_67); ok(pvaIn != NULL, "pvaIn == NULL\n"); ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); - ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s, expected "%s"\n", - wine_dbgstr_w(V_BSTR(pvaIn)), nav_serv_url); + ok(!lstrcmpW(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s, expected "%s"\n", + wine_dbgstr_w(V_BSTR(pvaIn)), wine_dbgstr_w(nav_serv_url)); ok(pvaOut != NULL, "pvaOut == NULL\n"); ok(V_VT(pvaOut) == VT_BOOL, "V_VT(pvaOut) = %d\n", V_VT(pvaOut)); ok(V_BOOL(pvaOut) == VARIANT_TRUE, "V_BOOL(pvaOut) = %x\n", V_BOOL(pvaOut)); @@ -3108,7 +3105,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ind = 1; SafeArrayGetElement(sa, &ind, &var); ok(V_VT(&var) == VT_BSTR, "Incorrect data type: %d\n", V_VT(&var)); - ok(!strcmp_wa(V_BSTR(&var), "winetest:doc"), "Page address: %s\n", wine_dbgstr_w(V_BSTR(&var))); + ok(!lstrcmpW(V_BSTR(&var), L"winetest:doc"), "Page address: %s\n", wine_dbgstr_w(V_BSTR(&var))); VariantClear(&var); ind = 2; SafeArrayGetElement(sa, &ind, &var); @@ -3299,11 +3296,11 @@ static HRESULT WINAPI EventDispatch_Invoke(IDispatch *iface, DISPID dispIdMember hres = IHTMLDocument2_get_readyState(doc, &state); ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
- if(!strcmp_wa(state, "interactive")) + if(!lstrcmpW(state, L"interactive")) CHECK_EXPECT(Invoke_OnReadyStateChange_Interactive); - else if(!strcmp_wa(state, "loading")) + else if(!lstrcmpW(state, L"loading")) CHECK_EXPECT(Invoke_OnReadyStateChange_Loading); - else if(!strcmp_wa(state, "complete")) { + else if(!lstrcmpW(state, L"complete")) { CHECK_EXPECT(Invoke_OnReadyStateChange_Complete); complete = TRUE; } else @@ -3488,13 +3485,13 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(IDocObjectService *i CHECK_EXPECT(FireBeforeNavigate2);
ok(!pDispatch, "pDispatch = %p\n", pDispatch); - ok(!strcmp_wa(lpszUrl, nav_url), "lpszUrl = %s, expected %s\n", wine_dbgstr_w(lpszUrl), nav_url); + ok(!lstrcmpW(lpszUrl, nav_url), "lpszUrl = %s, expected %s\n", wine_dbgstr_w(lpszUrl), wine_dbgstr_w(nav_url)); ok(dwFlags == 0x140 /* IE11*/ || dwFlags == 0x40 || !dwFlags || dwFlags == 0x50, "dwFlags = %x\n", dwFlags); ok(!lpszFrameName, "lpszFrameName = %s\n", wine_dbgstr_w(lpszFrameName)); if(!testing_submit) { ok(!pPostData, "pPostData = %p\n", pPostData); ok(!cbPostData, "cbPostData = %d\n", cbPostData); - ok(!lpszHeaders || !strcmp_wa(lpszHeaders, "Referer: http://test.winehq.org/tests/winehq_snapshot/%5Cr%5Cn"), + ok(!lpszHeaders || !lstrcmpW(lpszHeaders, L"Referer: http://test.winehq.org/tests/winehq_snapshot/%5Cr%5Cn"), "lpszHeaders = %s\n", wine_dbgstr_w(lpszHeaders)); }else { ok(cbPostData == 9, "cbPostData = %d\n", cbPostData); @@ -4330,7 +4327,7 @@ static IConnectionPointContainer ConnectionPointContainer = { &ConnectionPointCo static void test_NavigateWithBindCtx(BSTR uri, VARIANT *flags, VARIANT *target_frame, VARIANT *post_data, VARIANT *headers, IBindCtx *bind_ctx, LPOLESTR url_fragment) { - ok(!strcmp_wa(uri, nav_url), "uri = %s\n", wine_dbgstr_w(uri)); + ok(!lstrcmpW(uri, nav_url), "uri = %s\n", wine_dbgstr_w(uri)); ok(V_VT(flags) == VT_I4, "V_VT(flags) = %d\n", V_VT(flags)); ok(V_I4(flags) == navHyperlink, "V_I4(flags) = %x\n", V_I4(flags)); ok(!target_frame, "target_frame != NULL\n"); @@ -5391,13 +5388,13 @@ static void _test_readyState(unsigned line, IUnknown *unk) VARIANT out; HRESULT hres;
- static const LPCSTR expected_state[] = { - "uninitialized", - "loading", + static const LPCWSTR expected_state[] = { + L"uninitialized", + L"loading", NULL, - "interactive", - "complete", - "uninitialized" + L"interactive", + L"complete", + L"uninitialized" };
if(open_call || resetting_document) @@ -5417,11 +5414,11 @@ static void _test_readyState(unsigned line, IUnknown *unk) hres = IHTMLDocument2_get_readyState(htmldoc, &state); ok(hres == S_OK, "get_ReadyState failed: %08x\n", hres);
- if(!strcmp_wa(state, "interactive") && load_state == LD_LOADING) + if(!lstrcmpW(state, L"interactive") && load_state == LD_LOADING) load_state = LD_INTERACTIVE;
ok_(__FILE__, line) - (!strcmp_wa(state, expected_state[load_state]), "unexpected state %s, expected %d\n", + (!lstrcmpW(state, expected_state[load_state]), "unexpected state %s, expected %d\n", wine_dbgstr_w(state), load_state); SysFreeString(state);
@@ -5439,7 +5436,7 @@ static void _test_readyState(unsigned line, IUnknown *unk) IHTMLElement2_Release(elem2); ok(hres == S_OK, "get_readyState failed: %08x\n", hres); ok(V_VT(&var) == VT_BSTR, "V_VT(state) = %d\n", V_VT(&var)); - ok(!strcmp_wa(V_BSTR(&var), "complete"), "unexpected body state %s\n", wine_dbgstr_w(V_BSTR(&var))); + ok(!lstrcmpW(V_BSTR(&var), L"complete"), "unexpected body state %s\n", wine_dbgstr_w(V_BSTR(&var))); VariantClear(&var); }else { ok_(__FILE__,line)(load_state != LD_COMPLETE, "body is NULL in complete state\n"); @@ -5700,7 +5697,7 @@ static void test_Load(IPersistMoniker *persist, IMoniker *mon) if(!is_mhtml) test_GetCurMoniker((IUnknown*)persist, mon, NULL, FALSE); else - test_GetCurMoniker((IUnknown*)persist, NULL, "mhtml:winetest:doc", FALSE); + test_GetCurMoniker((IUnknown*)persist, NULL, L"mhtml:winetest:doc", FALSE);
IBindCtx_Release(bind);
@@ -5985,17 +5982,17 @@ static void test_Persist(IHTMLDocument2 *doc, IMoniker *mon) } }
-static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *href, const char *new_nav_url, BOOL is_js, +static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const WCHAR *href, const WCHAR *new_nav_url, BOOL is_js, BOOL is_hash, DWORD dwl_flags) { - const char *prev_nav_url = NULL; + const WCHAR *prev_nav_url = NULL; IHTMLPrivateWindow *priv_window; IHTMLLocation *location; IHTMLWindow2 *window; BSTR str, str2; HRESULT hres;
- trace("put_href %s...\n", new_nav_url); + trace("put_href %s...\n", wine_dbgstr_w(new_nav_url));
loading_js = is_js; loading_hash = is_hash; @@ -6012,7 +6009,7 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *hre if(!href) href = new_nav_url;
- str = a2bstr(href); + str = SysAllocString(href); SET_EXPECT(TranslateUrl); if(support_wbapp) { SET_EXPECT(FireBeforeNavigate2); @@ -6101,7 +6098,7 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *hre SET_EXPECT(Exec_ShellDocView_63); SET_EXPECT(Exec_ShellDocView_84);
- str = a2bstr(nav_url); + str = SysAllocString(nav_url); str2 = a2bstr(""); V_VT(&vempty) = VT_EMPTY; hres = IHTMLPrivateWindow_SuperNavigate(priv_window, str, str2, NULL, NULL, &vempty, &vempty, 0); @@ -6125,7 +6122,8 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *hre if(!is_hash) { hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &str2); ok(hres == S_OK, "GetAddressBarUrl failed: %08x\n", hres); - ok(!strcmp_wa(str2, prev_nav_url), "unexpected address bar url: %s, expected %s\n", wine_dbgstr_w(str2), prev_nav_url); + ok(!lstrcmpW(str2, prev_nav_url), "unexpected address bar url: %s, expected %s\n", wine_dbgstr_w(str2), + wine_dbgstr_w(prev_nav_url)); SysFreeString(str2);
if(is_js) { @@ -6145,11 +6143,11 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *hre hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &str2); ok(hres == S_OK, "GetAddressBarUrl failed: %08x\n", hres); if(is_js) - ok(!strcmp_wa(str2, prev_nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); + ok(!lstrcmpW(str2, prev_nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); else if (dwl_flags & DWL_EXTERNAL) - todo_wine ok(!strcmp_wa(str2, prev_nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); + todo_wine ok(!lstrcmpW(str2, prev_nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); else - ok(!strcmp_wa(str2, nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); + ok(!lstrcmpW(str2, nav_url), "unexpected address bar url: %s\n", wine_dbgstr_w(str2)); SysFreeString(str2); IHTMLPrivateWindow_Release(priv_window);
@@ -6169,8 +6167,8 @@ static void test_load_history(IHTMLDocument2 *doc) ok(hres == S_OK, "Could not get IPersistHistory iface: %08x\n", hres);
prev_url = nav_url; - nav_url = "http://test.winehq.org/tests/winehq_snapshot/#test"; - nav_serv_url = "http://test.winehq.org/tests/winehq_snapshot/"; + nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#test"; + nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/";
SET_EXPECT(Exec_ShellDocView_138); SET_EXPECT(Exec_ShellDocView_67); @@ -6255,7 +6253,7 @@ static void test_open_window(IHTMLDocument2 *doc, BOOL do_block) hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
- url = a2bstr(nav_serv_url = nav_url = "about:blank"); + url = SysAllocString(nav_serv_url = nav_url = L"about:blank"); name = a2bstr("test"); new_window = (void*)0xdeadbeef;
@@ -6345,7 +6343,7 @@ static void test_elem_from_point(IHTMLDocument2 *doc) hres = IHTMLElement_get_tagName(elem, &tag); IHTMLElement_Release(elem); ok(hres == S_OK, "get_tagName failed: %08x\n", hres); - ok(!strcmp_wa(tag, "DIV"), "tag = %s\n", wine_dbgstr_w(tag)); + ok(!lstrcmpW(tag, L"DIV"), "tag = %s\n", wine_dbgstr_w(tag)); }
static void test_clear(IHTMLDocument2 *doc) @@ -7492,7 +7490,7 @@ static void test_StreamLoad(IHTMLDocument2 *doc) todo_wine CHECK_CALLED(GetPendingUrl);
test_timer(EXPECT_SETTITLE); - test_GetCurMoniker((IUnknown*)doc, NULL, "about:blank", FALSE); + test_GetCurMoniker((IUnknown*)doc, NULL, L"about:blank", FALSE);
IPersistStreamInit_Release(init); } @@ -7526,7 +7524,7 @@ static void test_StreamInitNew(IHTMLDocument2 *doc) todo_wine CHECK_CALLED(GetPendingUrl);
test_timer(EXPECT_SETTITLE); - test_GetCurMoniker((IUnknown*)doc, NULL, "about:blank", FALSE); + test_GetCurMoniker((IUnknown*)doc, NULL, L"about:blank", FALSE);
IPersistStreamInit_Release(init); } @@ -7729,7 +7727,7 @@ static void test_MHTMLDocument(void)
init_test(LD_DOLOAD); is_mhtml = TRUE; - nav_url = nav_serv_url = "mhtml:winetest:doc"; + nav_url = nav_serv_url = L"mhtml:winetest:doc";
hres = CoCreateInstance(&CLSID_MHTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IHTMLDocument2, (void**)&doc); @@ -7751,7 +7749,7 @@ static void test_MHTMLDocument(void) test_GetCurMoniker((IUnknown*)doc, NULL, NULL, FALSE); test_Persist(doc, &Moniker); set_custom_uihandler(doc, &CustomDocHostUIHandler); - test_GetCurMoniker((IUnknown*)doc, NULL, "mhtml:winetest:doc", FALSE); + test_GetCurMoniker((IUnknown*)doc, NULL, L"mhtml:winetest:doc", FALSE); test_download(0);
test_exec_onunload(doc); @@ -7870,7 +7868,7 @@ static void test_doc_domain(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_domain(doc, &str); ok(hres == S_OK, "get_domain failed: %08x\n", hres); - ok(!strcmp_wa(str, "test.winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); + ok(!lstrcmpW(str, L"test.winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
str = a2bstr("winehq.org"); @@ -7880,7 +7878,7 @@ static void test_doc_domain(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_domain(doc, &str); ok(hres == S_OK, "get_domain failed: %08x\n", hres); - ok(!strcmp_wa(str, "winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); + ok(!lstrcmpW(str, L"winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
str = a2bstr("winehq.com"); @@ -7890,7 +7888,7 @@ static void test_doc_domain(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_domain(doc, &str); ok(hres == S_OK, "get_domain failed: %08x\n", hres); - ok(!strcmp_wa(str, "winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); + ok(!lstrcmpW(str, L"winehq.org"), "domain = %s\n", wine_dbgstr_w(str)); SysFreeString(str); }
@@ -7933,19 +7931,19 @@ static void test_HTMLDocument_http(BOOL with_wbapp) test_binding_ui((IUnknown*)doc); test_doc_domain(doc);
- nav_url = nav_serv_url = "http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */ + nav_url = nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */ if(support_wbapp) { - test_put_href(doc, FALSE, "#test", "http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0); + test_put_href(doc, FALSE, L"#test", L"http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0); test_travellog(doc); test_refresh(doc); } - test_put_href(doc, FALSE, NULL, "javascript:external%20&&undefined", TRUE, FALSE, 0); - test_put_href(doc, FALSE, NULL, "about:blank", FALSE, FALSE, support_wbapp ? DWL_EXPECT_HISTUPDATE : 0); - test_put_href(doc, TRUE, NULL, "about:replace", FALSE, FALSE, 0); + test_put_href(doc, FALSE, NULL, L"javascript:external%20&&undefined", TRUE, FALSE, 0); + test_put_href(doc, FALSE, NULL, L"about:blank", FALSE, FALSE, support_wbapp ? DWL_EXPECT_HISTUPDATE : 0); + test_put_href(doc, TRUE, NULL, L"about:replace", FALSE, FALSE, 0); if(support_wbapp) { test_load_history(doc); test_OmHistory(doc); - test_put_href(doc, FALSE, NULL, "about:blank", FALSE, FALSE, support_wbapp ? DWL_EXPECT_HISTUPDATE : 0); + test_put_href(doc, FALSE, NULL, L"about:blank", FALSE, FALSE, support_wbapp ? DWL_EXPECT_HISTUPDATE : 0); }
prev_url = nav_serv_url; @@ -7953,7 +7951,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp) if(!support_wbapp) /* FIXME */ test_open_window(doc, FALSE); if(support_wbapp) { - test_put_href(doc, FALSE, NULL, "http://test.winehq.org/tests/file.winetest", FALSE, FALSE, DWL_EXTERNAL); + test_put_href(doc, FALSE, NULL, L"http://test.winehq.org/tests/file.winetest", FALSE, FALSE, DWL_EXTERNAL); test_window_close(doc); }
@@ -8017,7 +8015,7 @@ static void reset_document(IHTMLDocument2 *doc)
resetting_document = FALSE;
- test_GetCurMoniker((IUnknown*)doc, NULL, "about:blank", FALSE); + test_GetCurMoniker((IUnknown*)doc, NULL, L"about:blank", FALSE);
IPersistStreamInit_Release(init); } @@ -8067,7 +8065,7 @@ static void test_submit(void) ok(hres == S_OK, "Could not get IHTMLFormElement: %08x\n", hres); IHTMLElement_Release(form_elem);
- nav_url = nav_serv_url = "winetest:test_submit"; + nav_url = nav_serv_url = L"winetest:test_submit"; testing_submit = TRUE;
SET_EXPECT(TranslateUrl);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=64952
Your paranoid android.
=== wxppro (32 bit report) ===
Report validation errors: mshtml:htmldoc is missing some skip messages
=== w2008s64 (32 bit report) ===
Report validation errors: mshtml:htmldoc is missing some skip messages
=== w2008s64 (64 bit report) ===
Report validation errors: mshtml:htmldoc is missing some skip messages