[PATCH 2/3] shell32/tests: Add a test for binding a different AutoComplete object to the same edit control
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Aug 27 12:10:47 CDT 2018
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
This new test will crash under Wine without the bugfix applied.
dlls/shell32/tests/autocomplete.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/tests/autocomplete.c b/dlls/shell32/tests/autocomplete.c
index 1c51e51..3c8de88 100644
--- a/dlls/shell32/tests/autocomplete.c
+++ b/dlls/shell32/tests/autocomplete.c
@@ -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;
--
1.9.1
More information about the wine-devel
mailing list