From 8157aa143b74f26dad9b41bfe719647828322c8d Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Mon, 1 Apr 2013 17:03:50 -0600 Subject: [PATCH] d3d9/tests: Verify window style after exiting fullscreen mode. --- dlls/d3d9/tests/device.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index bbbcbbc06cd..f30938b1a2e 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -3130,6 +3130,7 @@ static void test_window_style(void) LONG style, expected_style; IDirect3DDevice9 *device; IDirect3D9 *d3d9; + HRESULT hr; ULONG ref; @@ -3186,6 +3187,25 @@ static void test_window_style(void) focus_rect.left, focus_rect.top, focus_rect.right, focus_rect.bottom, r.left, r.top, r.right, r.bottom); + hr = reset_device(device, device_window, TRUE); + ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); + + style = GetWindowLongA(device_window, GWL_STYLE); + expected_style = device_style | WS_VISIBLE; + ok(style == expected_style, "Expected device window style %#x, got %#x.\n", + expected_style, style); + style = GetWindowLongA(device_window, GWL_EXSTYLE); + expected_style = device_exstyle | WS_EX_TOPMOST; + ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", + expected_style, style); + + style = GetWindowLongA(focus_window, GWL_STYLE); + ok(style == focus_style, "Expected focus window style %#x, got %#x.\n", + focus_style, style); + style = GetWindowLongA(focus_window, GWL_EXSTYLE); + ok(style == focus_exstyle, "Expected focus window extended style %#x, got %#x.\n", + focus_exstyle, style); + ref = IDirect3DDevice9_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref);