riched20/test: Added a test for TxDraw in txtsrv.c.

Austin Lund austin.lund at gmail.com
Wed Jun 3 01:08:49 CDT 2009


-------------- next part --------------
From bc4186c4c2ee25e026233885f5981d069ad4f925 Mon Sep 17 00:00:00 2001
From: Austin Lund <austin.lund at gmail.com>
Date: Wed, 3 Jun 2009 16:02:56 +1000
Subject: [PATCH] riched20/test: Added a test for TxDraw in txtsrv.c.

---
 dlls/riched20/tests/txtsrv.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index e4d6ae4..0c1a0c8 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -739,6 +739,31 @@ static void test_TxGetNaturalSize(void) {
     CoTaskMemFree(dummyTextHost);
 }
 
+void test_TxDraw()
+{
+    HDC tmphdc = GetDC(NULL);
+    DWORD dwAspect = (DWORD) ((DVASPECT) DVASPECT_CONTENT);
+    HDC hicTargetDev = NULL; /* Means "default" device */
+    DVTARGETDEVICE *ptd = NULL;
+    void *pvAspect = NULL;
+    HRESULT result;
+    RECTL client = {0,0,100,100};
+
+    if (!init_texthost())
+        return;
+
+    todo_wine {
+        result = ITextServices_TxDraw(txtserv, dwAspect, 0, pvAspect, ptd,
+                                      tmphdc, hicTargetDev, &client, NULL, 
+                                      NULL, NULL, 0, 0);
+        ok(result == S_OK, "TxDraw failed\n");
+    }
+
+    IUnknown_Release(txtserv);
+    CoTaskMemFree(dummyTextHost);
+
+}
+
 START_TEST( txtsrv )
 {
     setup_thiscall_wrappers();
@@ -756,6 +781,7 @@ START_TEST( txtsrv )
         test_TxGetText();
         test_TxSetText();
         test_TxGetNaturalSize();
+        test_TxDraw();
     }
     if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE);
 }
-- 
1.6.0.4


More information about the wine-patches mailing list