msxml3: Some tests to show that DISPID_VALUE properties are handled specially.

This commit is contained in:
Nikolay Sivov 2012-12-14 19:30:11 +03:00 committed by Alexandre Julliard
parent 7d3046cd02
commit 9f9ff5528c
1 changed files with 54 additions and 0 deletions

View File

@ -9939,7 +9939,9 @@ static void test_dispex(void)
IXMLHTTPRequest *req;
IXMLDOMElement *elem;
IDispatchEx *dispex;
DISPPARAMS dispparams;
IXMLDOMNode *node;
VARIANT arg, ret;
VARIANT_BOOL b;
IUnknown *unk;
HRESULT hr;
@ -9996,6 +9998,58 @@ static void test_dispex(void)
ok(did == DISPID_DOM_COLLECTION_BASE+1, "got 0x%08x\n", did);
IDispatchEx_Release(dispex);
did = -1;
hr = IDispatchEx_GetDispID(dispex, _bstr_("item"), 0, &did);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(did == DISPID_VALUE, "got %d\n", did);
V_VT(&arg) = VT_I4;
V_I2(&arg) = 0;
dispparams.cArgs = 1;
dispparams.cNamedArgs = 0;
dispparams.rgdispidNamedArgs = NULL;
dispparams.rgvarg = &arg;
V_VT(&ret) = VT_EMPTY;
V_DISPATCH(&ret) = (void*)0x1;
hr = IDispatchEx_Invoke(dispex, DISPID_VALUE, &IID_NULL, 0, DISPATCH_METHOD, &dispparams, &ret, NULL, NULL);
todo_wine
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(V_VT(&ret) == VT_DISPATCH, "got %d\n", V_VT(&ret));
ok(V_DISPATCH(&ret) == NULL, "got %p\n", V_DISPATCH(&ret));
V_VT(&ret) = VT_EMPTY;
V_DISPATCH(&ret) = (void*)0x1;
hr = IDispatchEx_Invoke(dispex, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &ret, NULL, NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(V_VT(&ret) == VT_DISPATCH, "got %d\n", V_VT(&ret));
ok(V_DISPATCH(&ret) == NULL, "got %p\n", V_DISPATCH(&ret));
dispparams.cArgs = 0;
dispparams.cNamedArgs = 0;
dispparams.rgdispidNamedArgs = NULL;
dispparams.rgvarg = NULL;
V_VT(&ret) = VT_EMPTY;
V_I4(&ret) = 1;
hr = IDispatchEx_Invoke(dispex, DISPID_DOM_NODELIST_LENGTH, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &ret, NULL, NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(V_VT(&ret) == VT_I4, "got %d\n", V_VT(&ret));
ok(V_I4(&ret) == 0, "got %d\n", V_I4(&ret));
dispparams.cArgs = 0;
dispparams.cNamedArgs = 0;
dispparams.rgdispidNamedArgs = NULL;
dispparams.rgvarg = NULL;
V_VT(&ret) = VT_EMPTY;
V_I4(&ret) = 1;
hr = IDispatchEx_Invoke(dispex, DISPID_DOM_NODELIST_LENGTH, &IID_NULL, 0, DISPATCH_METHOD, &dispparams, &ret, NULL, NULL);
ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x\n", hr);
todo_wine {
ok(V_VT(&ret) == VT_EMPTY, "got %d\n", V_VT(&ret));
ok(V_I4(&ret) == 1, "got %d\n", V_I4(&ret));
}
IXMLDOMNodeList_Release(node_list);
/* IXMLDOMParseError */