mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[BROWSEUI_APITEST] Strengthen ACListISF testcase (#3577)
Analyze CLSID_ACListISF's behavior about relative paths. CORE-9281
This commit is contained in:
parent
c449929fef
commit
e771589ae1
1 changed files with 179 additions and 18 deletions
|
@ -41,9 +41,6 @@ static DWORD g_WinVersion;
|
||||||
#expression, (int)(expected), _value); \
|
#expression, (int)(expected), _value); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void test_at_end_imp(CComPtr<IEnumString>& EnumStr)
|
static void test_at_end_imp(CComPtr<IEnumString>& EnumStr)
|
||||||
{
|
{
|
||||||
CComHeapPtr<OLECHAR> Result;
|
CComHeapPtr<OLECHAR> Result;
|
||||||
|
@ -128,11 +125,9 @@ test_ExpectFolders_imp(CComPtr<IEnumString>& EnumStr, LPITEMIDLIST pidlTarget, c
|
||||||
hr = EnumStr->Next(1, &Result, &Fetched);
|
hr = EnumStr->Next(1, &Result, &Fetched);
|
||||||
winetest_ok_hr(hr, S_OK);
|
winetest_ok_hr(hr, S_OK);
|
||||||
|
|
||||||
|
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
StringCchPrintfW(Buffer, _ARRAYSIZE(Buffer), L"%s%s", (options & IgnoreRoot) ? L"" : Root, (WCHAR*)DisplayName);
|
StringCchPrintfW(Buffer, _ARRAYSIZE(Buffer), L"%s%s", (options & IgnoreRoot) ? L"" : Root, (WCHAR*)DisplayName);
|
||||||
|
|
||||||
winetest_ok(!wcscmp(Buffer, Result), "Expected %s, got %s\n", wine_dbgstr_w(Buffer), wine_dbgstr_w(Result));
|
winetest_ok(!wcscmp(Buffer, Result), "Expected %s, got %s\n", wine_dbgstr_w(Buffer), wine_dbgstr_w(Result));
|
||||||
|
@ -159,12 +154,18 @@ test_ACListISF_NONE()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->SetOptions(ACLO_NONE), S_OK);
|
ok_hr(hr = ACList->SetOptions(ACLO_NONE), S_OK);
|
||||||
test_at_end(EnumStr);
|
test_at_end(EnumStr);
|
||||||
|
@ -177,7 +178,10 @@ test_ACListISF_NONE()
|
||||||
CComHeapPtr<ITEMIDLIST> pidlDiskRoot;
|
CComHeapPtr<ITEMIDLIST> pidlDiskRoot;
|
||||||
ok_hr(hr = SHParseDisplayName(Buffer, NULL, &pidlDiskRoot, NULL, NULL), S_OK);
|
ok_hr(hr = SHParseDisplayName(Buffer, NULL, &pidlDiskRoot, NULL, NULL), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("SHParseDisplayName failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->Expand(Buffer), S_OK);
|
ok_hr(hr = ACList->Expand(Buffer), S_OK);
|
||||||
test_ExpectFolders(EnumStr, pidlDiskRoot, Buffer, CheckLast | IgnoreHidden);
|
test_ExpectFolders(EnumStr, pidlDiskRoot, Buffer, CheckLast | IgnoreHidden);
|
||||||
|
@ -195,17 +199,26 @@ test_ACListISF_CURRENTDIR()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<ICurrentWorkingDirectory> CurrentWorkingDir;
|
CComPtr<ICurrentWorkingDirectory> CurrentWorkingDir;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_ICurrentWorkingDirectory, (void**)&CurrentWorkingDir), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_ICurrentWorkingDirectory, (void**)&CurrentWorkingDir), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->SetOptions(ACLO_CURRENTDIR), S_OK);
|
ok_hr(hr = ACList->SetOptions(ACLO_CURRENTDIR), S_OK);
|
||||||
test_at_end(EnumStr);
|
test_at_end(EnumStr);
|
||||||
|
@ -325,18 +338,10 @@ test_ACListISF_CURRENTDIR()
|
||||||
ok_wstr(psz, L"tes2");
|
ok_wstr(psz, L"tes2");
|
||||||
CoTaskMemFree(psz);
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
hr = EnumStr->Next(1, &psz, &cGot);
|
|
||||||
ok_hr(hr, S_FALSE);
|
|
||||||
CoTaskMemFree(psz);
|
|
||||||
|
|
||||||
StringCbCopyW(szPath, sizeof(szPath), szDir);
|
StringCbCopyW(szPath, sizeof(szPath), szDir);
|
||||||
StringCbCatW(szPath, sizeof(szPath), L"\\BROWSEUI-2");
|
StringCbCatW(szPath, sizeof(szPath), L"\\BROWSEUI-2");
|
||||||
ok_hr(hr = CurrentWorkingDir->SetDirectory(szPath), S_OK);
|
ok_hr(hr = CurrentWorkingDir->SetDirectory(szPath), S_OK);
|
||||||
|
|
||||||
hr = EnumStr->Next(1, &psz, &cGot);
|
|
||||||
ok_hr(hr, S_FALSE);
|
|
||||||
CoTaskMemFree(psz);
|
|
||||||
|
|
||||||
EnumStr->Reset();
|
EnumStr->Reset();
|
||||||
|
|
||||||
hr = EnumStr->Next(1, &psz, &cGot);
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
@ -349,10 +354,6 @@ test_ACListISF_CURRENTDIR()
|
||||||
ok_wstr(psz, L"tes2");
|
ok_wstr(psz, L"tes2");
|
||||||
CoTaskMemFree(psz);
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
hr = EnumStr->Next(1, &psz, &cGot);
|
|
||||||
ok_hr(hr, S_FALSE);
|
|
||||||
CoTaskMemFree(psz);
|
|
||||||
|
|
||||||
StringCbCopyW(szPath, sizeof(szPath), szDir);
|
StringCbCopyW(szPath, sizeof(szPath), szDir);
|
||||||
StringCbCatW(szPath, sizeof(szPath), L"\\BROWSEUI-1\\TEST1");
|
StringCbCatW(szPath, sizeof(szPath), L"\\BROWSEUI-1\\TEST1");
|
||||||
RemoveDirectoryW(szPath);
|
RemoveDirectoryW(szPath);
|
||||||
|
@ -378,6 +379,121 @@ test_ACListISF_CURRENTDIR()
|
||||||
RemoveDirectoryW(szPath);
|
RemoveDirectoryW(szPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_ACListISF_CURRENTDIR2()
|
||||||
|
{
|
||||||
|
CComPtr<IEnumString> EnumStr;
|
||||||
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CComPtr<IACList2> ACList;
|
||||||
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CComPtr<ICurrentWorkingDirectory> CurrentWorkingDir;
|
||||||
|
ok_hr(hr = EnumStr->QueryInterface(IID_ICurrentWorkingDirectory, (void**)&CurrentWorkingDir), S_OK);
|
||||||
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ok_hr(hr = ACList->SetOptions(ACLO_CURRENTDIR), S_OK);
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-1", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-1\\TEST1", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-1\\TEST2", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-1\\TEST1\\TEST3", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-2", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-2\\TEST1", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-2\\TEST2", NULL);
|
||||||
|
CreateDirectoryW(L"C:\\BROWSEUI-2\\TEST1\\TEST4", NULL);
|
||||||
|
|
||||||
|
ok_hr(hr = CurrentWorkingDir->SetDirectory(L"C:\\BROWSEUI-1\\TEST1"), S_OK);
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
ok_hr(hr = ACList->Expand(L"C:\\BROWSEUI-2\\TEST1\\"), S_OK);
|
||||||
|
|
||||||
|
LPWSTR psz;
|
||||||
|
ULONG cGot;
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"C:\\BROWSEUI-2\\TEST1\\TEST4");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"TEST3");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
ok_hr(hr = ACList->Expand(L"C:\\BROWSEUI-1\\TEST1\\"), S_OK);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"C:\\BROWSEUI-1\\TEST1\\TEST3");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"TEST3");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
ok_hr(hr = CurrentWorkingDir->SetDirectory(L"C:\\BROWSEUI-2\\TEST1"), S_OK);
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
ok_hr(hr = ACList->Expand(L"..\\TEST1\\"), S_OK);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"..\\TEST1\\TEST4");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"TEST4");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
ok_hr(hr = ACList->Expand(L"\\BROWSEUI-2\\TEST1\\"), S_OK);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"\\BROWSEUI-2\\TEST1\\TEST4");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
hr = EnumStr->Next(1, &psz, &cGot);
|
||||||
|
ok_hr(hr, S_OK);
|
||||||
|
ok_wstr(psz, L"TEST4");
|
||||||
|
CoTaskMemFree(psz);
|
||||||
|
|
||||||
|
test_at_end(EnumStr);
|
||||||
|
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-1\\TEST1\\TEST3");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-1\\TEST1");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-1\\TEST2");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-1");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-2\\TEST1\\TEST4");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-2\\TEST1");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-2\\TEST2");
|
||||||
|
RemoveDirectoryW(L"C:\\BROWSEUI-2");
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_ACListISF_MYCOMPUTER()
|
test_ACListISF_MYCOMPUTER()
|
||||||
{
|
{
|
||||||
|
@ -385,7 +501,10 @@ test_ACListISF_MYCOMPUTER()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IACList2, &ACList));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IACList2, &ACList));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check the default
|
// Check the default
|
||||||
DWORD CurrentOption = 0xdeadbeef;
|
DWORD CurrentOption = 0xdeadbeef;
|
||||||
|
@ -397,18 +516,26 @@ test_ACListISF_MYCOMPUTER()
|
||||||
CComPtr<IEnumString> EnumStr;
|
CComPtr<IEnumString> EnumStr;
|
||||||
ok_hr(hr = ACList->QueryInterface(IID_IEnumString, (void**)&EnumStr), S_OK);
|
ok_hr(hr = ACList->QueryInterface(IID_IEnumString, (void**)&EnumStr), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IPersistFolder> PersistFolder;
|
CComPtr<IPersistFolder> PersistFolder;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IPersistFolder, (void**)&PersistFolder), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IPersistFolder, (void**)&PersistFolder), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComHeapPtr<ITEMIDLIST> pidlMyComputer;
|
CComHeapPtr<ITEMIDLIST> pidlMyComputer;
|
||||||
ok_hr(hr = SHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidlMyComputer), S_OK);
|
ok_hr(hr = SHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidlMyComputer), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("SHGetSpecialFolderLocation failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
hr = EnumStr->Reset();
|
hr = EnumStr->Reset();
|
||||||
if (g_WinVersion < WINVER_VISTA)
|
if (g_WinVersion < WINVER_VISTA)
|
||||||
|
@ -455,12 +582,18 @@ test_ACListISF_DESKTOP()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->SetOptions(ACLO_DESKTOP), S_OK);
|
ok_hr(hr = ACList->SetOptions(ACLO_DESKTOP), S_OK);
|
||||||
test_ExpectFolders(EnumStr, NULL, NULL, IgnoreRoot | CheckLast | IgnoreHidden);
|
test_ExpectFolders(EnumStr, NULL, NULL, IgnoreRoot | CheckLast | IgnoreHidden);
|
||||||
|
@ -473,17 +606,26 @@ test_ACListISF_FAVORITES()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComHeapPtr<ITEMIDLIST> pidlFavorites;
|
CComHeapPtr<ITEMIDLIST> pidlFavorites;
|
||||||
ok_hr(hr = SHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidlFavorites), S_OK);
|
ok_hr(hr = SHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidlFavorites), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("SHGetSpecialFolderLocation failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->SetOptions(ACLO_FAVORITES), S_OK);
|
ok_hr(hr = ACList->SetOptions(ACLO_FAVORITES), S_OK);
|
||||||
test_ExpectFolders(EnumStr, pidlFavorites, NULL, IgnoreRoot | CheckLast | IgnoreHidden);
|
test_ExpectFolders(EnumStr, pidlFavorites, NULL, IgnoreRoot | CheckLast | IgnoreHidden);
|
||||||
|
@ -496,12 +638,18 @@ test_ACListISF_FILESYSONLY()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
WCHAR Buffer[MAX_PATH];
|
WCHAR Buffer[MAX_PATH];
|
||||||
GetSystemWindowsDirectoryW(Buffer, _ARRAYSIZE(Buffer));
|
GetSystemWindowsDirectoryW(Buffer, _ARRAYSIZE(Buffer));
|
||||||
|
@ -510,7 +658,10 @@ test_ACListISF_FILESYSONLY()
|
||||||
CComHeapPtr<ITEMIDLIST> pidlDiskRoot;
|
CComHeapPtr<ITEMIDLIST> pidlDiskRoot;
|
||||||
ok_hr(hr = SHParseDisplayName(Buffer, NULL, &pidlDiskRoot, NULL, NULL), S_OK);
|
ok_hr(hr = SHParseDisplayName(Buffer, NULL, &pidlDiskRoot, NULL, NULL), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("SHParseDisplayName failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ok_hr(hr = ACList->SetOptions(ACLO_FILESYSONLY), S_OK);
|
ok_hr(hr = ACList->SetOptions(ACLO_FILESYSONLY), S_OK);
|
||||||
test_at_end(EnumStr);
|
test_at_end(EnumStr);
|
||||||
|
@ -526,12 +677,18 @@ test_ACListISF_FILESYSDIRS()
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
HRESULT hr = CoCreateInstance(CLSID_ACListISF, NULL, CLSCTX_ALL, IID_PPV_ARG(IEnumString, &EnumStr));
|
||||||
ok_hr(hr, S_OK);
|
ok_hr(hr, S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("CoCreateInstance failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CComPtr<IACList2> ACList;
|
CComPtr<IACList2> ACList;
|
||||||
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
ok_hr(hr = EnumStr->QueryInterface(IID_IACList2, (void**)&ACList), S_OK);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
skip("QueryInterface failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
WCHAR Buffer[MAX_PATH];
|
WCHAR Buffer[MAX_PATH];
|
||||||
GetSystemWindowsDirectoryW(Buffer, _ARRAYSIZE(Buffer));
|
GetSystemWindowsDirectoryW(Buffer, _ARRAYSIZE(Buffer));
|
||||||
|
@ -578,10 +735,14 @@ START_TEST(ACListISF)
|
||||||
CCoInit init;
|
CCoInit init;
|
||||||
ok_hr(init.hres, S_OK);
|
ok_hr(init.hres, S_OK);
|
||||||
if (!SUCCEEDED(init.hres))
|
if (!SUCCEEDED(init.hres))
|
||||||
|
{
|
||||||
|
skip("CoInitialize failed\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
test_ACListISF_NONE();
|
test_ACListISF_NONE();
|
||||||
test_ACListISF_CURRENTDIR();
|
test_ACListISF_CURRENTDIR();
|
||||||
|
test_ACListISF_CURRENTDIR2();
|
||||||
test_ACListISF_MYCOMPUTER();
|
test_ACListISF_MYCOMPUTER();
|
||||||
test_ACListISF_DESKTOP();
|
test_ACListISF_DESKTOP();
|
||||||
test_ACListISF_FAVORITES();
|
test_ACListISF_FAVORITES();
|
||||||
|
|
Loading…
Reference in a new issue