From: Stefan Dösinger Subject: [PATCH 1/2] d3d8/tests: Don't check the foreground window if we're not in foreground. Message-Id: <1412771855-20707-1-git-send-email-stefan@codeweavers.com> Date: Wed, 8 Oct 2014 14:37:34 +0200 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