shell32/tests: Only look for Explorer windows for the progman tests.

Francois Gouget fgouget at free.fr
Wed Feb 17 20:18:13 CST 2016


In the Spanish locale the 'Startup' folder is called 'Inicio' which matches another window. Closing that window causes the shutdown dialog to pop up, resulting in a test timeout.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 dlls/shell32/tests/progman_dde.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/tests/progman_dde.c b/dlls/shell32/tests/progman_dde.c
index a3faa83..4c9116e 100644
--- a/dlls/shell32/tests/progman_dde.c
+++ b/dlls/shell32/tests/progman_dde.c
@@ -372,7 +372,13 @@ static HWND CheckWindowCreated(const char *winName, BOOL closeWindow, int testPa
     for (i = 0; window == NULL && i < PDDE_POLL_NUM; i++)
     {
         Sleep(PDDE_POLL_TIME);
-        window = FindWindowA(NULL, winName);
+        /* Specify the window class name to make sure what we find is really an
+         * Explorer window. Explorer used two different window classes so try
+         * both.
+         */
+        window = FindWindowA("ExplorerWClass", winName);
+        if (!window)
+            window = FindWindowA("CabinetWClass", winName);
     }
     ok (window != NULL, "Window \"%s\" was not created in %i seconds - assumed failure.%s\n",
         winName, PDDE_POLL_NUM*PDDE_POLL_TIME/1000, GetStringFromTestParams(testParams));
-- 
2.7.0



More information about the wine-patches mailing list