Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- v2: Supersede 181597~181598. Fix intermittent test failures on TestBots.
dlls/user32/tests/win.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 25d643f54a..9845f9830d 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -8306,6 +8306,7 @@ static void test_fullscreen(void) 0, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW }; WNDCLASSA cls; + int timeout; HWND hwnd; int i, j; POINT pt; @@ -8429,6 +8430,35 @@ static void test_fullscreen(void) } }
+ /* Test restoring a full screen window with WS_THICKFRAME style to normal */ + /* Add WS_THICKFRAME style later so that the window can cover the entire monitor */ + hwnd = CreateWindowA("fullscreen_class", NULL, WS_POPUP | WS_VISIBLE, 0, 0, mi.rcMonitor.right, + mi.rcMonitor.bottom, NULL, NULL, GetModuleHandleA(NULL), NULL); + ok(!!hwnd, "CreateWindow failed, error %#x.\n", GetLastError()); + flush_events(TRUE); + + /* Add WS_THICKFRAME and exit full screen */ + SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_THICKFRAME); + SetWindowPos(hwnd, 0, 0, 0, 100, 100, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS); + flush_events(TRUE); + + /* TestBots need about 1000ms to exit full screen */ + timeout = 1000; + while (timeout > 0) + { + timeout -= 200; + flush_events(TRUE); + GetWindowRect(hwnd, &rc); + if (rc.right - rc.left == 100 && rc.bottom - rc.top == 100) + break; + } + /* FVWM used by TestBots are not EWMH compliant. So this bug doesn't appear. */ + todo_wine_if(rc.right - rc.left != 100) + ok(rc.right - rc.left == 100, "Expect width %d, got %d.\n", 100, rc.right - rc.left); + todo_wine_if(rc.bottom - rc.top != 100) + ok(rc.bottom - rc.top == 100, "Expect height %d, got %d.\n", 100, rc.bottom - rc.top); + DestroyWindow(hwnd); + UnregisterClassA("fullscreen_class", GetModuleHandleA(NULL)); }
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=67945
Your paranoid android.
=== w1064v1507 (32 bit report) ===
user32: win.c:9481: Test failed: Timed out waiting for the child process
=== w1064v1809 (32 bit report) ===
user32: win.c:3164: Test failed: GetActiveWindow() = 00030060 win.c:3188: Test failed: GetActiveWindow() = 00030060 win.c:3889: Test failed: hwnd 00050078/000C02CE message 0737 win.c:3894: Test failed: hwnd 000C02CE/000C02CE message 0202 win.c:3899: Test failed: hwnd 000C02CE/000C02CE message 0203
=== w1064v1809_2scr (32 bit report) ===
user32: win.c:3164: Test failed: GetActiveWindow() = 00060054 win.c:3167: Test failed: GetFocus() = 00000000 win.c:3179: Test failed: GetFocus() = 00000000 win.c:3182: Test failed: GetFocus() = 00000000 win.c:3185: Test failed: GetFocus() = 00000000 win.c:3188: Test failed: GetActiveWindow() = 00060054 win.c:3192: Test failed: GetFocus() = 00000000 win.c:3195: Test failed: GetFocus() = 00000000 win.c:3884: Test failed: hwnd 000200E2/0004029A message 0737 win.c:3889: Test failed: hwnd 0004029A/0004029A message 0201 win.c:3894: Test failed: hwnd 0004029A/0004029A message 0202 win.c:3899: Test failed: hwnd 0004029A/0004029A message 0203 win.c:3903: Test failed: message 0202 available
=== w1064v1809_ja (32 bit report) ===
user32: win.c:3724: Test failed: message 0738 available win.c:3849: Test failed: hwnd 000202FE message 7fff win.c:3928: Test failed: hwnd 000202FE/001602BE message 7fff win.c:3931: Test failed: hwnd 000202FE/001602BE message 7fff
=== w1064v1809_zh_CN (32 bit report) ===
user32: win.c:3849: Test failed: hwnd 00010380 message 0282 win.c:3928: Test failed: hwnd 00010380/000C03A6 message 0282 win.c:3931: Test failed: hwnd 00010380/000C03A6 message 0282
=== w1064v1809 (64 bit report) ===
user32: win.c:3164: Test failed: GetActiveWindow() = 0000000000030060 win.c:3167: Test failed: GetFocus() = 0000000000000000 win.c:3179: Test failed: GetFocus() = 0000000000000000 win.c:3182: Test failed: GetFocus() = 0000000000000000 win.c:3185: Test failed: GetFocus() = 0000000000000000 win.c:3188: Test failed: GetActiveWindow() = 0000000000030060 win.c:3192: Test failed: GetFocus() = 0000000000000000 win.c:3195: Test failed: GetFocus() = 0000000000000000 win.c:3889: Test failed: hwnd 00000000000200E4/00000000001402D2 message 0737 win.c:3894: Test failed: hwnd 00000000001402D2/00000000001402D2 message 0202 win.c:3899: Test failed: hwnd 00000000001402D2/00000000001402D2 message 0203 win.c:3903: Test failed: message 0202 available