Zhiyi Zhang : gdi32/tests: Add D3DKMTSetVidPnSourceOwner tests.

Alexandre Julliard julliard at winehq.org
Fri May 24 15:46:36 CDT 2019


Module: wine
Branch: master
Commit: bf3e32b5b0a604041a5b9d31267a5b7de96db6f2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bf3e32b5b0a604041a5b9d31267a5b7de96db6f2

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Fri May 24 09:23:32 2019 +0100

gdi32/tests: Add D3DKMTSetVidPnSourceOwner tests.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/tests/driver.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index ef9a7ae..d8ae0f8 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -590,6 +590,22 @@ static void test_D3DKMTCheckVidPnExclusiveOwnership(void)
     ok(status == STATUS_SUCCESS, "Got unexpected return code %#x.\n", status);
 }
 
+static void test_D3DKMTSetVidPnSourceOwner(void)
+{
+    D3DKMT_SETVIDPNSOURCEOWNER set_owner_desc = {0};
+    NTSTATUS status;
+
+    if (!pD3DKMTSetVidPnSourceOwner || pD3DKMTSetVidPnSourceOwner(&set_owner_desc) == STATUS_PROCEDURE_NOT_FOUND)
+    {
+        skip("D3DKMTSetVidPnSourceOwner() is unavailable.\n");
+        return;
+    }
+
+    /* Invalid parameters */
+    status = pD3DKMTSetVidPnSourceOwner(&set_owner_desc);
+    ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status);
+}
+
 START_TEST(driver)
 {
     HMODULE gdi32 = GetModuleHandleA("gdi32.dll");
@@ -608,4 +624,5 @@ START_TEST(driver)
     test_D3DKMTCreateDevice();
     test_D3DKMTDestroyDevice();
     test_D3DKMTCheckVidPnExclusiveOwnership();
+    test_D3DKMTSetVidPnSourceOwner();
 }




More information about the wine-cvs mailing list