Module: wine Branch: master Commit: ffcced0f3906534e6765730d44d8e9d82bbf864e URL: http://source.winehq.org/git/wine.git/?a=commit;h=ffcced0f3906534e6765730d44...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Feb 20 12:59:34 2014 +0400
ole32/tests: Handle context generation failure better.
---
dlls/ole32/tests/compobj.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index c96dfe0..b85842b 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -192,7 +192,13 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie) actctx.lpSource = path;
handle = pCreateActCtxW(&actctx); - ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE || broken(handle == INVALID_HANDLE_VALUE) /* some old XP/2k3 versions */, + "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); + if (handle == INVALID_HANDLE_VALUE) + { + win_skip("activation context generation failed, some tests will be skipped\n"); + handle = NULL; + }
ok(actctx.cbSize == sizeof(ACTCTXW), "actctx.cbSize=%d\n", actctx.cbSize); ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags); @@ -206,8 +212,11 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie)
DeleteFileA("file.manifest");
- ret = pActivateActCtx(handle, cookie); - ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + if (handle) + { + ret = pActivateActCtx(handle, cookie); + ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + }
return handle; }