Commit a7984a3a authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

dxgi/tests: Test the fullscreen state after the swapchain window is destroyed.

parent 22e76d03
......@@ -2363,6 +2363,7 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
IDXGISwapChain *swapchain;
IDXGIFactory *factory;
IDXGIOutput *output;
BOOL fullscreen;
ULONG refcount;
HRESULT hr;
......@@ -2432,11 +2433,20 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
DestroyWindow(swapchain_desc.OutputWindow);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
refcount = IDXGISwapChain_Release(swapchain);
......@@ -2448,13 +2458,25 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
DestroyWindow(swapchain_desc.OutputWindow);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr);
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
refcount = IDXGISwapChain_Release(swapchain);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment