>From 246196101db1fa9f07e0dc17f8754183bd288dd6 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Sat, 6 Jun 2009 13:42:38 +0200 Subject: [PATCH] Use strcmp_wa instead of lstrcmpW to test correctly on Win98 --- dlls/mshtml/tests/dom.c | 18 +++++------------- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index fa861ad..7e43693 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -58,14 +58,10 @@ static const char cond_comment_str[] = "" ""; -static const WCHAR noneW[] = {'N','o','n','e',0}; - static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0}; static WCHAR texteditW[] = {'t','e','x','t','e','d','i','t',0}; static WCHAR wordW[] = {'w','o','r','d',0}; -static const WCHAR text_javascriptW[] = {'t','e','x','t','/','j','a','v','a','s','c','r','i','p','t',0}; - typedef enum { ET_NONE, ET_HTML, @@ -3638,7 +3634,7 @@ static void test_default_selection(IHTMLDocument2 *doc) hres = IHTMLSelectionObject_get_type(selection, &str); ok(hres == S_OK, "get_type failed: %08x\n", hres); - ok(!lstrcmpW(str, noneW), "type = %s\n", dbgstr_w(str)); + ok(!strcmp_wa(str, "None"), "type = %s\n", dbgstr_w(str)); SysFreeString(str); hres = IHTMLSelectionObject_createRange(selection, &disp); @@ -3661,7 +3657,6 @@ static void test_default_body(IHTMLBodyElement *body) VARIANT v; WCHAR sBodyText[] = {'#','F','F','0','0','0','0',0}; WCHAR sTextInvalid[] = {'I','n','v','a','l','i','d',0}; - WCHAR sResInvalid[] = {'#','0','0','a','0','d','0',0}; bstr = (void*)0xdeadbeef; hres = IHTMLBodyElement_get_background(body, &bstr); @@ -3694,7 +3689,7 @@ static void test_default_body(IHTMLBodyElement *body) hres = IHTMLBodyElement_get_text(body, &v); ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR got %d\n", V_VT(&v)); - ok(!lstrcmpW(sResInvalid, V_BSTR(&v)), "v != sResInvalid\n"); + ok(!strcmp_wa(V_BSTR(&v), "#00a0d0"), "v != '#00a0d0'\n"); VariantClear(&v); /* get_text - Valid Text */ @@ -3715,7 +3710,6 @@ static void test_default_body(IHTMLBodyElement *body) static void test_body_funs(IHTMLBodyElement *body) { static WCHAR sRed[] = {'r','e','d',0}; - static WCHAR sRedbg[] = {'#','f','f','0','0','0','0',0}; VARIANT vbg; VARIANT vDefaultbg; HRESULT hres; @@ -3733,7 +3727,7 @@ static void test_body_funs(IHTMLBodyElement *body) hres = IHTMLBodyElement_get_bgColor(body, &vbg); ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); ok(V_VT(&vDefaultbg) == VT_BSTR, "V_VT(&vDefaultbg) != VT_BSTR\n"); - ok(!lstrcmpW(V_BSTR(&vbg), sRedbg), "Unexpected type %s\n", dbgstr_w(V_BSTR(&vbg))); + ok(!strcmp_wa(V_BSTR(&vbg), "#ff0000"), "Unexpected bgcolor %s\n", dbgstr_w(V_BSTR(&vbg))); VariantClear(&vbg); /* Restore Originial */ @@ -4319,7 +4313,7 @@ static void test_elems(IHTMLDocument2 *doc) hres = IHTMLScriptElement_get_type(script, &type); ok(hres == S_OK, "get_type failed: %08x\n", hres); - ok(!lstrcmpW(type, text_javascriptW), "Unexpected type %s\n", dbgstr_w(type)); + ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", dbgstr_w(type)); SysFreeString(type); /* test defer */ @@ -4733,12 +4727,10 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D BSTR state; HRESULT hres; - static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0}; - hres = IHTMLDocument2_get_readyState(notif_doc, &state); ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - if(!lstrcmpW(state, completeW)) + if(!strcmp_wa(state, "complete")) doc_complete = TRUE; SysFreeString(state); -- 1.6.0.6