Module: wine Branch: master Commit: 665c90a9c7541c2908557feec519ac6493b1801b URL: http://source.winehq.org/git/wine.git/?a=commit;h=665c90a9c7541c2908557feec5...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Thu Jan 21 11:59:31 2010 +0100
user32/tests: Don't crash on Win9x/WinMe.
---
dlls/user32/tests/win.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 7bf498e..6fb6ce0 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2785,14 +2785,21 @@ static void test_capture_4(void) hmenu = CreatePopupMenu();
ret = AppendMenuA( hmenu, MF_STRING, 1, "winetest2"); - ok( ret, "AppendMenA has failed!\n"); + ok( ret, "AppendMenuA has failed!\n");
/* set main window to have initial capture */ SetCapture(hwnd);
- /* create popup (it will self-destruct) */ - ret = TrackPopupMenu(hmenu, 0x100, 100,100, 0, hwnd, NULL); - ok( ret == 0, "TrackPopupMenu returned %d expected zero\n", ret); + if (!GetWindowLongW(GetDesktopWindow(), GWL_STYLE)) + { + win_skip("TrackPopupMenu test crashes on Win9x/WinMe\n"); + } + else + { + /* create popup (it will self-destruct) */ + ret = TrackPopupMenu(hmenu, TPM_RETURNCMD, 100, 100, 0, hwnd, NULL); + ok( ret == 0, "TrackPopupMenu returned %d expected zero\n", ret); + }
/* clean up */ DestroyMenu(hmenu);