mirror of
https://github.com/reactos/reactos.git
synced 2025-05-14 14:56:44 +00:00
[KERNEL32_APITEST] -Try to avoid crashes in DefaultActCtx test.
svn path=/trunk/; revision=73574
This commit is contained in:
parent
0aeb3f07b1
commit
8896e6a8c4
1 changed files with 52 additions and 24 deletions
|
@ -44,11 +44,19 @@ START_TEST(DefaultActCtx)
|
||||||
&buffer,
|
&buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
NULL);
|
NULL);
|
||||||
ok(res == TRUE, "\n");
|
ok(res == TRUE, "Expected success\n");
|
||||||
ok(info->lpRootManifestPath == NULL, "Expected null lpRootManifestPath, got %S\n", info->lpRootManifestPath);
|
if(res)
|
||||||
ok(info->lpRootConfigurationPath == NULL, "Expected null lpRootConfigurationPath, got %S\n", info->lpRootConfigurationPath);
|
{
|
||||||
ok(info->lpAppDirPath == NULL, "Expected null lpAppDirPath, got %S\n", info->lpAppDirPath);
|
ok(info->lpRootManifestPath == NULL, "Expected null lpRootManifestPath, got %S\n", info->lpRootManifestPath);
|
||||||
ok(info->ulAssemblyCount == 0, "\n");
|
ok(info->lpRootConfigurationPath == NULL, "Expected null lpRootConfigurationPath, got %S\n", info->lpRootConfigurationPath);
|
||||||
|
ok(info->lpAppDirPath == NULL, "Expected null lpAppDirPath, got %S\n", info->lpAppDirPath);
|
||||||
|
ok(info->ulAssemblyCount == 0, "Expected 0 assemblies\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skip("ActivationContextDetailedInformation failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
|
res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
|
||||||
|
@ -58,12 +66,19 @@ START_TEST(DefaultActCtx)
|
||||||
&buffer,
|
&buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
NULL);
|
NULL);
|
||||||
ok(res == TRUE, "\n");
|
ok(res == TRUE, "Expected success\n");
|
||||||
ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
|
if (res)
|
||||||
ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
|
{
|
||||||
ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
|
ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
|
||||||
ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
|
ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
|
||||||
|
ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
|
||||||
|
ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skip("AssemblyDetailedInformationInActivationContext failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
|
res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -72,15 +87,22 @@ START_TEST(DefaultActCtx)
|
||||||
&buffer,
|
&buffer,
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
NULL);
|
NULL);
|
||||||
ok(res == TRUE, "\n"); /* This is FALSE in win10 */
|
ok(res == TRUE, "Expected success\n"); /* This is FALSE in win10 */
|
||||||
ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
|
if (res)
|
||||||
ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
|
{
|
||||||
ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
|
ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
|
||||||
ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
|
ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
|
||||||
|
ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
|
||||||
|
ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skip("AssemblyDetailedInformationInActivationContext failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
res = GetCurrentActCtx (&h);
|
res = GetCurrentActCtx (&h);
|
||||||
ok(res == TRUE, "\n");
|
ok(res == TRUE, "Expected success\n");
|
||||||
ok(h == NULL, "\n");
|
ok(h == NULL, "Expected null current context\n");
|
||||||
|
|
||||||
KeyedData.cbSize = sizeof(KeyedData);
|
KeyedData.cbSize = sizeof(KeyedData);
|
||||||
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
||||||
|
@ -88,7 +110,7 @@ START_TEST(DefaultActCtx)
|
||||||
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
||||||
L"Microsoft.Windows.SysyemCompatible",
|
L"Microsoft.Windows.SysyemCompatible",
|
||||||
&KeyedData);
|
&KeyedData);
|
||||||
ok(res == FALSE, "\n");
|
ok(res == FALSE, "Expected failure\n");
|
||||||
|
|
||||||
KeyedData.cbSize = sizeof(KeyedData);
|
KeyedData.cbSize = sizeof(KeyedData);
|
||||||
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
||||||
|
@ -96,7 +118,7 @@ START_TEST(DefaultActCtx)
|
||||||
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
||||||
L"System Default Context",
|
L"System Default Context",
|
||||||
&KeyedData);
|
&KeyedData);
|
||||||
ok(res == FALSE, "\n");
|
ok(res == FALSE, "Expected failure\n");
|
||||||
|
|
||||||
KeyedData.cbSize = sizeof(KeyedData);
|
KeyedData.cbSize = sizeof(KeyedData);
|
||||||
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
|
||||||
|
@ -104,9 +126,15 @@ START_TEST(DefaultActCtx)
|
||||||
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
|
||||||
L"Microsoft.Windows.Common-Controls",
|
L"Microsoft.Windows.Common-Controls",
|
||||||
&KeyedData);
|
&KeyedData);
|
||||||
ok(res == TRUE, "\n");
|
ok(res == TRUE, "Expected success\n");
|
||||||
ok(KeyedData.hActCtx == NULL, "Expected null handle for common control context\n");
|
if (res)
|
||||||
ok(KeyedData.ulAssemblyRosterIndex != 0, "%lu\n", KeyedData.ulAssemblyRosterIndex);
|
{
|
||||||
//ok(wcsstr(details-> , L"SystemCompative"
|
ok(KeyedData.hActCtx == NULL, "Expected null handle for common control context\n");
|
||||||
|
ok(KeyedData.ulAssemblyRosterIndex != 0, "%lu\n", KeyedData.ulAssemblyRosterIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
skip("ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue