Hi Alistair,
Alistair Leslie-Hughes wrote:
Hi,
Changelog: mshtml: Implement IHTMLStyle get/put borderRightStyle
+static BOOL IsValidBorderStyle(BSTR v)
- Please use the same name convention as other functions in this file - There is no test proving that the style is validated - You didn't include get_borderRightStyle, which makes put_borderRightStyle almost useless
static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
That's not what changelog says.
Jacek
Hi Jakek,
"Jacek Caban" jacek@codeweavers.com wrote in message news:496A47AF.50506@codeweavers.com...
Hi Alistair,
Alistair Leslie-Hughes wrote:
Hi,
Changelog: mshtml: Implement IHTMLStyle get/put borderRightStyle
+static BOOL IsValidBorderStyle(BSTR v)
- Please use the same name convention as other functions in this file
- There is no test proving that the style is validated
- You didn't include get_borderRightStyle, which makes
put_borderRightStyle almost useless
static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
That's not what changelog says.
Thanks for the catch.
I added a test case
V_VT(&arg) = VT_BSTR; V_BSTR(&arg) = a2bstr("invalid"); hres = IHTMLStyle_Invoke(pStyle, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAUT, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL); ok_(__FILE__,line) (hres == S_OK, "invalid. ret: %08x\n", hres); VariantClear(&arg);
The problem is hres is DISP_E_EXCEPTION, whereas I'm expecting E_INVALIDARG (Tested on windows). It appears in ITypeInfo_fnInvoke, if an error is returned from the function call, the result is changed to return DISP_E_EXCEPTION (~ line 6320).
Should ITypeInfo_fnInvoke propergate the returned HRESULT instead of changing it?
Best Regards Alistair Leslie-Hughes
Hi Alistair,
Alistair Leslie-Hughes wrote:
The problem is hres is DISP_E_EXCEPTION, whereas I'm expecting E_INVALIDARG (Tested on windows). It appears in ITypeInfo_fnInvoke, if an error is returned from the function call, the result is changed to return DISP_E_EXCEPTION (~ line 6320).
Should ITypeInfo_fnInvoke propergate the returned HRESULT instead of changing it?
Native mshtml.dll doesn't use typelib for IDispatch calls, so it may handle errors differently. It's not something that we want to test in DOM tests, so changing test to check for FAILED(hres) should be fine. Otherwise you could call interface functions directly in tests, without using IDispatch.
Jacek