shell32/tests: Add a test for binding a different AutoComplete object to the same edit control.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2018-08-27 20:10:47 +03:00 committed by Alexandre Julliard
parent 9c2217216c
commit 6f3e83f7fc

View file

@ -141,7 +141,7 @@ if (0)
static IAutoComplete *test_init(void)
{
HRESULT r;
IAutoComplete *ac;
IAutoComplete *ac, *ac2;
IUnknown *acSource;
LONG_PTR user_data;
@ -176,6 +176,15 @@ static IAutoComplete *test_init(void)
user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA);
ok(user_data == 0, "Expected the edit control user data to be zero\n");
/* bind a different object to the same edit control */
r = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER,
&IID_IAutoComplete, (LPVOID*)&ac2);
ok(r == S_OK, "no IID_IAutoComplete (0x%08x)\n", r);
r = IAutoComplete_Init(ac2, hEdit, acSource, NULL, NULL);
ok(r == S_OK, "Init returned 0x%08x\n", r);
IAutoComplete_Release(ac2);
IUnknown_Release(acSource);
return ac;