mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[WSHOM_WINETEST] Sync with Wine 3.0. CORE-14225
This commit is contained in:
parent
3672658e75
commit
161232c08b
|
@ -569,6 +569,54 @@ static void test_registry(void)
|
|||
IWshShell3_Release(sh3);
|
||||
}
|
||||
|
||||
static void test_popup(void)
|
||||
{
|
||||
static const WCHAR textW[] = {'T','e','x','t',0};
|
||||
VARIANT timeout, type, title, optional;
|
||||
IWshShell *sh;
|
||||
int button;
|
||||
HRESULT hr;
|
||||
BSTR text;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
|
||||
&IID_IWshShell, (void **)&sh);
|
||||
ok(hr == S_OK, "Failed to create WshShell object, hr %#x.\n", hr);
|
||||
|
||||
button = 123;
|
||||
text = SysAllocString(textW);
|
||||
|
||||
hr = IWshShell_Popup(sh, NULL, NULL, NULL, NULL, &button);
|
||||
ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
|
||||
ok(button == 123, "Unexpected button id %d.\n", button);
|
||||
|
||||
hr = IWshShell_Popup(sh, text, NULL, NULL, NULL, &button);
|
||||
ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
|
||||
ok(button == 123, "Unexpected button id %d.\n", button);
|
||||
|
||||
V_VT(&optional) = VT_ERROR;
|
||||
V_ERROR(&optional) = DISP_E_PARAMNOTFOUND;
|
||||
|
||||
V_VT(&timeout) = VT_I2;
|
||||
V_I2(&timeout) = 1;
|
||||
|
||||
V_VT(&type) = VT_I2;
|
||||
V_I2(&type) = 1;
|
||||
|
||||
V_VT(&title) = VT_BSTR;
|
||||
V_BSTR(&title) = NULL;
|
||||
|
||||
hr = IWshShell_Popup(sh, text, &timeout, &optional, &type, &button);
|
||||
ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
|
||||
ok(button == -1, "Unexpected button id %d.\n", button);
|
||||
|
||||
hr = IWshShell_Popup(sh, text, &timeout, &title, &optional, &button);
|
||||
ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
|
||||
ok(button == -1, "Unexpected button id %d.\n", button);
|
||||
|
||||
SysFreeString(text);
|
||||
IWshShell_Release(sh);
|
||||
}
|
||||
|
||||
START_TEST(wshom)
|
||||
{
|
||||
IUnknown *unk;
|
||||
|
@ -586,6 +634,7 @@ START_TEST(wshom)
|
|||
|
||||
test_wshshell();
|
||||
test_registry();
|
||||
test_popup();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue