Module: wine Branch: master Commit: 861811206c2f3a2959ee064d7bdddcc01794b16b URL: https://gitlab.winehq.org/wine/wine/-/commit/861811206c2f3a2959ee064d7bdddcc...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Thu Aug 18 19:17:05 2022 +0900
winmm/tests: Add MCI_DGV_WINDOW_STATE tests.
---
dlls/winmm/tests/mci.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index ba810f6f096..fc24bec26a0 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1424,6 +1424,9 @@ static void test_asyncWaveTypeMpegvideo(HWND hwnd) Sleep(200); test_notification(hwnd,"play",0);
+ err = mciSendStringA("window mysound state hide", NULL, 0, NULL); + todo_wine ok(err == MCIERR_NO_WINDOW, "mci window state returned %s\n", dbg_mcierr(err)); + err = mciSendStringA("close mysound wait", NULL, 0, NULL); ok(!err,"mci close wait returned %s\n", dbg_mcierr(err)); test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED); @@ -1689,6 +1692,12 @@ static void test_video_window(void) ok(IsWindow(video_window), "Video window should exist.\n"); ok(!IsWindowVisible(video_window), "Video window should be hidden.\n");
+ /* Test MCI_DGV_WINDOW_STATE for the non-default window. */ + parm.win.nCmdShow = SW_MINIMIZE; + err = mciSendCommandW(id, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err, "Got %s.\n", dbg_mcierr(err)); + todo_wine ok(IsIconic(main_window), "Video window should be minimized.\n"); + /* video window is reset to the default window, which is visible again */ parm.win.hWnd = NULL; err = mciSendCommandW(id, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); @@ -1698,9 +1707,15 @@ static void test_video_window(void)
err = mciSendCommandW(id, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm); ok(!err, "Got %s.\n", dbg_mcierr(err)); - ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n", + todo_wine ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc));
+ /* Test MCI_DGV_WINDOW_STATE for the default window. */ + parm.win.nCmdShow = SW_MINIMIZE; + err = mciSendCommandW(id, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err, "Got %s.\n", dbg_mcierr(err)); + todo_wine ok(IsIconic(video_window), "Video window should be minimized.\n"); + err = mciSendCommandW(id, MCI_CLOSE, 0, 0); ok(!err, "Got %s.\n", dbg_mcierr(err));