user32: Make test_SetForegroundWindow() the last message test

Dmitry Timoshkov dmitry at codeweavers.com
Tue Jun 24 03:48:08 CDT 2008


Hello,

as reported by James Hawkins test_menu_messages() test doesn't pass
under Windows. That's because test_SetForegroundWindow() somehow
screws up active/foreground window behaviour, and CreateWindow is
no more able to make a freshly created window active/foreground, so
that key press events go to it.

Changelog:
    user32: Make test_SetForegroundWindow() the last message test.
---
 dlls/user32/tests/msg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f2f335f..390aca4 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10840,9 +10840,12 @@ START_TEST(msg)
     test_sys_menu();
     test_dialog_messages();
     test_nullCallback();
-    test_SetForegroundWindow();
     test_dbcs_wm_char();
     test_menu_messages();
+    /* keep it the last test, under Windows it tends to break the tests
+     * which rely on active/foreground windows being correct.
+     */
+    test_SetForegroundWindow();
 
     UnhookWindowsHookEx(hCBT_hook);
     if (pUnhookWinEvent)
-- 
1.5.5.4






More information about the wine-patches mailing list