shell32/tests: Some additional tests for IShellBrowser.
This commit is contained in:
parent
73100ce679
commit
008099f618
|
@ -184,9 +184,11 @@ static void test_SB_misc(void)
|
||||||
{
|
{
|
||||||
IExplorerBrowser *peb;
|
IExplorerBrowser *peb;
|
||||||
IShellBrowser *psb;
|
IShellBrowser *psb;
|
||||||
|
IUnknown *punk;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
HWND retHwnd;
|
HWND retHwnd;
|
||||||
LONG lres;
|
LRESULT lres;
|
||||||
|
LONG ref;
|
||||||
|
|
||||||
ebrowser_instantiate(&peb);
|
ebrowser_instantiate(&peb);
|
||||||
hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb);
|
hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb);
|
||||||
|
@ -227,9 +229,95 @@ static void test_SB_misc(void)
|
||||||
hr = IShellBrowser_SetMenuSB(psb, NULL, NULL, NULL);
|
hr = IShellBrowser_SetMenuSB(psb, NULL, NULL, NULL);
|
||||||
ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr);
|
ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
/***** Before EB::Initialize *****/
|
||||||
|
|
||||||
|
/* ::GetWindow */
|
||||||
|
retHwnd = (HWND)0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_GetWindow(psb, &retHwnd);
|
||||||
|
ok(hr == E_FAIL, "got (0x%08x)\n", hr);
|
||||||
|
ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n");
|
||||||
|
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
|
||||||
|
/* ::SendControlMsg */
|
||||||
|
lres = 0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(lres == 0, "lres was %ld\n", lres);
|
||||||
|
|
||||||
|
lres = 0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, TB_CHECKBUTTON,
|
||||||
|
FCIDM_TB_SMALLICON, TRUE, &lres);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(lres == 0, "lres was %ld\n", lres);
|
||||||
|
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_TREE, 0, 0, 0, NULL);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_PROGRESS, 0, 0, 0, NULL);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ::QueryActiveShellView */
|
||||||
|
hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk);
|
||||||
|
ok(hr == E_FAIL, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
/* Initialize ExplorerBrowser */
|
||||||
|
ebrowser_initialize(peb);
|
||||||
|
|
||||||
|
/***** After EB::Initialize *****/
|
||||||
|
|
||||||
|
/* ::GetWindow */
|
||||||
|
hr = IShellBrowser_GetWindow(psb, &retHwnd);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(GetParent(retHwnd) == hwnd, "The HWND returned is not our child.\n");
|
||||||
|
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
/* ::SendControlMsg */
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
lres = 0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, 0, 0, 0, &lres);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(lres == 0, "lres was %ld\n", lres);
|
||||||
|
|
||||||
|
lres = 0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(lres == 0, "lres was %ld\n", lres);
|
||||||
|
|
||||||
|
lres = 0xDEADBEEF;
|
||||||
|
hr = IShellBrowser_SendControlMsg(psb, 1234, 0, 0, 0, &lres);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
ok(lres == 0, "lres was %ld\n", lres);
|
||||||
|
|
||||||
|
/* Returns S_OK */
|
||||||
|
hr = IShellBrowser_SetStatusTextSB(psb, NULL);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
hr = IShellBrowser_ContextSensitiveHelp(psb, FALSE);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
hr = IShellBrowser_EnableModelessSB(psb, TRUE);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
|
hr = IShellBrowser_SetToolbarItems(psb, NULL, 1, 1);
|
||||||
|
ok(hr == S_OK, "got (0x%08x)\n", hr);
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk);
|
||||||
|
ok(hr == E_FAIL, "got (0x%08x)\n", hr);
|
||||||
|
|
||||||
IShellBrowser_Release(psb);
|
IShellBrowser_Release(psb);
|
||||||
lres = IExplorerBrowser_Release(peb);
|
IExplorerBrowser_Destroy(peb);
|
||||||
ok(lres == 0, "Got %d\n", lres);
|
ref = IExplorerBrowser_Release(peb);
|
||||||
|
ok(ref == 0, "Got %d\n", ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_initialization(void)
|
static void test_initialization(void)
|
||||||
|
|
Loading…
Reference in New Issue