[PATCH 1/2] d3d8/tests: Don't check the foreground window if we're not in foreground.

Stefan Dösinger stefan at codeweavers.com
Wed Oct 8 07:37:34 CDT 2014


These two patches fix test failures when the process is not in
foreground that print changing error lines. This avoids generating
warnings from the testbot whenever d3d8/tests/device.c is touched.

There are many more failures in d3d8:device when the test is not in
foreground. Those failures write static lines and I'd prefer the testbot
to be changed to run them in foreground instead.
---
 dlls/d3d8/tests/device.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index e066b77..0896e0d 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -2394,9 +2394,12 @@ static void test_wndproc_windowed(void)
 
     tmp = GetFocus();
     ok(tmp == device_window, "Expected focus %p, got %p.\n", device_window, tmp);
-    tmp = GetForegroundWindow();
-    ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n",
-            thread_params.dummy_window, tmp);
+    if (thread_params.running_in_foreground)
+    {
+        tmp = GetForegroundWindow();
+        ok(tmp == thread_params.dummy_window, "Expected foreground window %p, got %p.\n",
+                thread_params.dummy_window, tmp);
+    }
 
     proc = GetWindowLongPtrA(device_window, GWLP_WNDPROC);
     ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n",
-- 
2.0.4




More information about the wine-patches mailing list