Re: comctl32: Fix the updown control test to pass under XP
Hey, I was just about to send a similar patch in as well. I mentioned this in a different thread yesterday, but the updown ok_sequence_() function is not honoring the optional flag, you need this chunk of code as well: diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c @@ -279,6 +280,8 @@ static void ok_sequence_(int sequence_in expected++; actual++; } + else if (expected->flags & optional) + expected++; else if (todo) { failcount++; On 1/20/07, Dmitry Timoshkov <dmitry(a)codeweavers.com> wrote:
Hello,
this patch makes the updown test pass cleanly under XP, and (inadvertently) allows one more message sequence to pass under Wine.
Changelog: comctl32: Fix the updown control test to pass under XP.
--- dlls/comctl32/tests/updown.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index e0b8131..9a9c493 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -109,6 +109,7 @@ static const struct message create_parent_wnd_seq[] = { { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, /* Win9x adds SWP_NOZORDER below */ { WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, + { WM_NCCALCSIZE, sent|wparam|optional, 1 }, { WM_SIZE, sent }, { WM_MOVE, sent }, { 0 } @@ -123,7 +124,7 @@ static const struct message add_updown_with_edit_seq[] = { { WM_WINDOWPOSCHANGING, sent }, { WM_NCCALCSIZE, sent|wparam, TRUE }, { WM_WINDOWPOSCHANGED, sent }, - { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_RESTORED, MAKELONG(91, 75) }, + { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED /*, MAKELONG(91, 75) exact size depends on font */ }, { 0 } };
@@ -202,6 +203,8 @@ static void ok_sequence_(int sequence_index, const struct message *expected,
while (expected->message && actual->message) { + trace_( file, line)("expected %04x - actual %04x\n", expected->message, actual->message); + if (expected->message == actual->message) { if (expected->flags & wparam) @@ -356,6 +359,8 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP message != WM_GETICON && message != WM_DEVICECHANGE) { + trace("parent: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -413,6 +418,8 @@ static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LRESULT ret; struct message msg;
+ trace("edit: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -459,6 +466,8 @@ static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wPara LRESULT ret; struct message msg;
+ trace("updown: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -519,7 +528,7 @@ static void test_create_updown_control(void) updown = create_updown_control(); ok(updown != NULL, "Failed to create updown control\n"); ok_sequence(PARENT_SEQ_INDEX, add_updown_to_parent_seq, "add updown control to parent", TRUE); - ok_sequence(EDIT_SEQ_INDEX, add_updown_with_edit_seq, "add updown control with edit", TRUE); + ok_sequence(EDIT_SEQ_INDEX, add_updown_with_edit_seq, "add updown control with edit", FALSE);
flush_sequences();
-- 1.4.4.4
participants (1)
-
Lei Zhang