Commit 6f3e83f7 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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

parent 9c221721
...@@ -141,7 +141,7 @@ if (0) ...@@ -141,7 +141,7 @@ if (0)
static IAutoComplete *test_init(void) static IAutoComplete *test_init(void)
{ {
HRESULT r; HRESULT r;
IAutoComplete *ac; IAutoComplete *ac, *ac2;
IUnknown *acSource; IUnknown *acSource;
LONG_PTR user_data; LONG_PTR user_data;
...@@ -176,6 +176,15 @@ static IAutoComplete *test_init(void) ...@@ -176,6 +176,15 @@ static IAutoComplete *test_init(void)
user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA); user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA);
ok(user_data == 0, "Expected the edit control user data to be zero\n"); 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); IUnknown_Release(acSource);
return ac; return ac;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment