Juan Lang : wintrust: Remove a couple tests that fail on a variety of systems.

Alexandre Julliard julliard at winehq.org
Thu Feb 12 11:14:45 CST 2009


Module: wine
Branch: master
Commit: 22ea6bd61126ad72b20778bd456352b5503e4b2d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=22ea6bd61126ad72b20778bd456352b5503e4b2d

Author: Juan Lang <juan.lang at gmail.com>
Date:   Wed Feb 11 18:03:14 2009 -0800

wintrust: Remove a couple tests that fail on a variety of systems.

---

 dlls/wintrust/tests/register.c |   45 ----------------------------------------
 1 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/dlls/wintrust/tests/register.c b/dlls/wintrust/tests/register.c
index 37801cc..9d1437f 100644
--- a/dlls/wintrust/tests/register.c
+++ b/dlls/wintrust/tests/register.c
@@ -165,12 +165,10 @@ static void test_AddRem_ActionID(void)
 static void test_AddDefaultForUsage(void)
 {
     BOOL ret;
-    LONG res;
     static GUID ActionID        = { 0xdeadbeef, 0xdead, 0xbeef, { 0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef }};
     static WCHAR DummyDllW[]    = {'d','e','a','d','b','e','e','f','.','d','l','l',0 };
     static CHAR DummyFunction[] = "dummyfunction";
     static const CHAR oid[]     = "1.2.3.4.5.6.7.8.9.10";
-    static const CHAR Usages[]  = "SOFTWARE\\Microsoft\\Cryptography\\Providers\\Trust\\Usages\\1.2.3.4.5.6.7.8.9.10";
     static CRYPT_PROVIDER_REGDEFUSAGE DefUsage;
 
     if (!pWintrustAddDefaultForUsage)
@@ -206,27 +204,6 @@ static void test_AddDefaultForUsage(void)
     ok (GetLastError() == ERROR_INVALID_PARAMETER,
         "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
 
-    /* Just the ActionID */
-    memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
-    DefUsage.cbStruct = sizeof(CRYPT_PROVIDER_REGDEFUSAGE);
-    DefUsage.pgActionID = &ActionID;
-    SetLastError(0xdeadbeef);
-    ret = pWintrustAddDefaultForUsage(oid, &DefUsage);
-    ok ( ret, "Expected WintrustAddDefaultForUsage to succeed\n");
-    ok (GetLastError() == 0xdeadbeef,
-        "Last error should not have been changed: %u\n", GetLastError());
-   
-    /* No ActionID */
-    memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
-    DefUsage.cbStruct = sizeof(CRYPT_PROVIDER_REGDEFUSAGE);
-    DefUsage.pwszDllName = DummyDllW;
-    DefUsage.pwszLoadCallbackDataFunctionName = DummyFunction;
-    DefUsage.pwszFreeCallbackDataFunctionName = DummyFunction;
-    ret = pWintrustAddDefaultForUsage(oid, &DefUsage);
-    ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
-    ok (GetLastError() == ERROR_INVALID_PARAMETER,
-        "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
-
     /* cbStruct set to 0 */
     memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
     DefUsage.cbStruct = 0;
@@ -239,28 +216,6 @@ static void test_AddDefaultForUsage(void)
     ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
     ok (GetLastError() == ERROR_INVALID_PARAMETER,
         "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
-
-    /* All OK */
-    memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
-    DefUsage.cbStruct = sizeof(CRYPT_PROVIDER_REGDEFUSAGE);
-    DefUsage.pgActionID = &ActionID;
-    DefUsage.pwszDllName = DummyDllW;
-    DefUsage.pwszLoadCallbackDataFunctionName = DummyFunction;
-    DefUsage.pwszFreeCallbackDataFunctionName = DummyFunction;
-    SetLastError(0xdeadbeef);
-    ret = pWintrustAddDefaultForUsage(oid, &DefUsage);
-    ok ( ret, "Expected WintrustAddDefaultForUsage to succeed\n");
-    ok (GetLastError() == 0xdeadbeef,
-        "Last error should not have been changed: %u\n", GetLastError());
-
-    /* There is no corresponding remove for WintrustAddDefaultForUsage
-     * so we delete the registry key manually.
-     */
-    if (ret)
-    {
-        res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, Usages);
-        ok (res == ERROR_SUCCESS, "Key delete failed : 0x%08x\n", res);
-    }
 }
 
 static void test_LoadFunctionPointers(void)




More information about the wine-cvs mailing list