mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
sync mshtml and shdocvw winetests with wine 1.1.15
svn path=/trunk/; revision=39594
This commit is contained in:
parent
90d8b6c3f7
commit
25c067c47e
3 changed files with 174 additions and 3 deletions
|
@ -307,6 +307,8 @@ static const IID * const style_iids[] = {
|
|||
&IID_IDispatchEx,
|
||||
&IID_IHTMLStyle,
|
||||
&IID_IHTMLStyle2,
|
||||
&IID_IHTMLStyle3,
|
||||
&IID_IHTMLStyle4,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -2411,6 +2413,7 @@ static void test_default_style(IHTMLStyle *style)
|
|||
float f;
|
||||
BSTR sOverflowDefault;
|
||||
BSTR sDefault;
|
||||
VARIANT vDefault;
|
||||
|
||||
test_disp((IUnknown*)style, &DIID_DispHTMLStyle);
|
||||
test_ifaces((IUnknown*)style, style_iids);
|
||||
|
@ -2429,6 +2432,82 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(hres == S_OK, "get_fontWeight failed: %08x\n", hres);
|
||||
ok(!str, "fontWeight = %s\n", dbgstr_w(str));
|
||||
|
||||
hres = IHTMLStyle_get_fontWeight(style, &sDefault);
|
||||
ok(hres == S_OK, "get_fontWeight failed: %08x\n", hres);
|
||||
|
||||
str = a2bstr("test");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == E_INVALIDARG, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("bold");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("bolder");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("lighter");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("100");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("200");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("300");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("400");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("500");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("600");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("700");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("800");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = a2bstr("900");
|
||||
hres = IHTMLStyle_put_fontWeight(style, str);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
hres = IHTMLStyle_get_fontWeight(style, &str);
|
||||
ok(hres == S_OK, "get_fontWeight failed: %08x\n", hres);
|
||||
ok(!strcmp_wa(str, "900"), "str != style900\n");
|
||||
SysFreeString(str);
|
||||
|
||||
hres = IHTMLStyle_put_fontWeight(style, sDefault);
|
||||
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
|
||||
|
||||
/* font Variant */
|
||||
hres = IHTMLStyle_get_fontVariant(style, NULL);
|
||||
ok(hres == E_INVALIDARG, "get_fontVariant failed: %08x\n", hres);
|
||||
|
@ -2482,11 +2561,33 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
|
||||
ok(b == VARIANT_FALSE, "textDecorationUnderline = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_put_textDecorationUnderline(style, VARIANT_TRUE);
|
||||
ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
|
||||
ok(b == VARIANT_FALSE, "textDecorationUnderline = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_get_textDecorationUnderline(style, &b);
|
||||
ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
|
||||
ok(b == VARIANT_TRUE, "textDecorationUnderline = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_put_textDecorationUnderline(style, VARIANT_FALSE);
|
||||
ok(hres == S_OK, "get_textDecorationUnderline failed: %08x\n", hres);
|
||||
|
||||
b = 0xfefe;
|
||||
hres = IHTMLStyle_get_textDecorationLineThrough(style, &b);
|
||||
ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres);
|
||||
ok(b == VARIANT_FALSE, "textDecorationLineThrough = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_put_textDecorationLineThrough(style, VARIANT_TRUE);
|
||||
ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres);
|
||||
ok(b == VARIANT_FALSE, "textDecorationLineThrough = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_get_textDecorationLineThrough(style, &b);
|
||||
ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres);
|
||||
ok(b == VARIANT_TRUE, "textDecorationLineThrough = %x\n", b);
|
||||
|
||||
hres = IHTMLStyle_put_textDecorationLineThrough(style, VARIANT_FALSE);
|
||||
ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres);
|
||||
|
||||
hres = IHTMLStyle_get_posWidth(style, NULL);
|
||||
ok(hres == E_POINTER, "get_posWidth failed: %08x\n", hres);
|
||||
|
||||
|
@ -2904,6 +3005,29 @@ static void test_default_style(IHTMLStyle *style)
|
|||
test_border_styles(style, str);
|
||||
SysFreeString(str);
|
||||
|
||||
hres = IHTMLStyle_get_backgroundColor(style, &v);
|
||||
ok(hres == S_OK, "get_backgroundColor: %08x\n", hres);
|
||||
ok(V_VT(&v) == VT_BSTR, "type failed: %d\n", V_VT(&v));
|
||||
ok(!V_BSTR(&v), "str=%s\n", dbgstr_w(V_BSTR(&v)));
|
||||
VariantClear(&v);
|
||||
|
||||
/* PaddingLeft */
|
||||
hres = IHTMLStyle_get_paddingLeft(style, &vDefault);
|
||||
ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
|
||||
|
||||
V_VT(&v) = VT_BSTR;
|
||||
V_BSTR(&v) = a2bstr("10");
|
||||
hres = IHTMLStyle_put_paddingLeft(style, v);
|
||||
ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
|
||||
VariantClear(&v);
|
||||
|
||||
hres = IHTMLStyle_get_paddingLeft(style, &v);
|
||||
ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
|
||||
ok(!strcmp_wa(V_BSTR(&v), "10px"), "expecte 10 = %s\n", dbgstr_w(V_BSTR(&v)));
|
||||
|
||||
hres = IHTMLStyle_put_paddingLeft(style, vDefault);
|
||||
ok(hres == S_OK, "get_paddingLeft: %08x\n", hres);
|
||||
|
||||
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
|
||||
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
|
||||
if(SUCCEEDED(hres)) {
|
||||
|
|
|
@ -36,6 +36,20 @@
|
|||
|
||||
DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
#define CTXARG_T DWORDLONG
|
||||
#define IActiveScriptParseVtbl IActiveScriptParse64Vtbl
|
||||
#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_64Vtbl
|
||||
|
||||
#else
|
||||
|
||||
#define CTXARG_T DWORD
|
||||
#define IActiveScriptParseVtbl IActiveScriptParse32Vtbl
|
||||
#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_32Vtbl
|
||||
|
||||
#endif
|
||||
|
||||
#define DEFINE_EXPECT(func) \
|
||||
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
|
||||
|
||||
|
@ -538,7 +552,7 @@ static ULONG WINAPI ActiveScriptParseProcedure_Release(IActiveScriptParseProcedu
|
|||
static HRESULT WINAPI ActiveScriptParseProcedure_ParseProcedureText(IActiveScriptParseProcedure2 *iface,
|
||||
LPCOLESTR pstrCode, LPCOLESTR pstrFormalParams, LPCOLESTR pstrProcedureName,
|
||||
LPCOLESTR pstrItemName, IUnknown *punkContext, LPCOLESTR pstrDelimiter,
|
||||
DWORD dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, IDispatch **ppdisp)
|
||||
CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, IDispatch **ppdisp)
|
||||
{
|
||||
ok(0, "unexpected call\n");
|
||||
return E_NOTIMPL;
|
||||
|
@ -579,7 +593,7 @@ static HRESULT WINAPI ActiveScriptParse_InitNew(IActiveScriptParse *iface)
|
|||
static HRESULT WINAPI ActiveScriptParse_AddScriptlet(IActiveScriptParse *iface,
|
||||
LPCOLESTR pstrDefaultName, LPCOLESTR pstrCode, LPCOLESTR pstrItemName,
|
||||
LPCOLESTR pstrSubItemName, LPCOLESTR pstrEventName, LPCOLESTR pstrDelimiter,
|
||||
DWORD dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags,
|
||||
CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags,
|
||||
BSTR *pbstrName, EXCEPINFO *pexcepinfo)
|
||||
{
|
||||
ok(0, "unexpected call\n");
|
||||
|
@ -588,7 +602,7 @@ static HRESULT WINAPI ActiveScriptParse_AddScriptlet(IActiveScriptParse *iface,
|
|||
|
||||
static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *iface,
|
||||
LPCOLESTR pstrCode, LPCOLESTR pstrItemName, IUnknown *punkContext,
|
||||
LPCOLESTR pstrDelimiter, DWORD dwSourceContextCookie, ULONG ulStartingLine,
|
||||
LPCOLESTR pstrDelimiter, CTXARG_T dwSourceContextCookie, ULONG ulStartingLine,
|
||||
DWORD dwFlags, VARIANT *pvarResult, EXCEPINFO *pexcepinfo)
|
||||
{
|
||||
IDispatchEx *document;
|
||||
|
|
|
@ -69,6 +69,9 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
|||
expect_ ## func = called_ ## func = FALSE; \
|
||||
}while(0)
|
||||
|
||||
#define CLEAR_CALLED(func) \
|
||||
expect_ ## func = called_ ## func = FALSE
|
||||
|
||||
DEFINE_EXPECT(GetContainer);
|
||||
DEFINE_EXPECT(Site_GetWindow);
|
||||
DEFINE_EXPECT(ShowObject);
|
||||
|
@ -1773,6 +1776,35 @@ static void test_Offline(IWebBrowser2 *wb, IOleControl *control, BOOL is_clients
|
|||
ok(b == VARIANT_FALSE, "b=%x\n", b);
|
||||
}
|
||||
|
||||
static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
|
||||
SET_EXPECT(Invoke_AMBIENT_SILENT);
|
||||
SET_EXPECT(Invoke_AMBIENT_USERMODE);
|
||||
SET_EXPECT(Invoke_AMBIENT_DLCONTROL);
|
||||
SET_EXPECT(Invoke_AMBIENT_USERAGENT);
|
||||
SET_EXPECT(Invoke_AMBIENT_PALETTE);
|
||||
|
||||
hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN);
|
||||
ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres);
|
||||
|
||||
CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
|
||||
CHECK_EXPECT(Invoke_AMBIENT_SILENT);
|
||||
CHECK_EXPECT(Invoke_AMBIENT_USERMODE);
|
||||
CHECK_EXPECT(Invoke_AMBIENT_DLCONTROL);
|
||||
CHECK_EXPECT(Invoke_AMBIENT_USERAGENT);
|
||||
CHECK_EXPECT(Invoke_AMBIENT_PALETTE);
|
||||
|
||||
CLEAR_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
|
||||
CLEAR_CALLED(Invoke_AMBIENT_SILENT);
|
||||
CLEAR_CALLED(Invoke_AMBIENT_USERMODE);
|
||||
CLEAR_CALLED(Invoke_AMBIENT_DLCONTROL);
|
||||
CLEAR_CALLED(Invoke_AMBIENT_USERAGENT);
|
||||
CLEAR_CALLED(Invoke_AMBIENT_PALETTE);
|
||||
}
|
||||
|
||||
static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)
|
||||
{
|
||||
IWebBrowser2 *wb;
|
||||
|
@ -1787,6 +1819,7 @@ static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite)
|
|||
|
||||
test_Silent(wb, control, is_clientsite);
|
||||
test_Offline(wb, control, is_clientsite);
|
||||
test_ambient_unknown(wb, control, is_clientsite);
|
||||
|
||||
IWebBrowser_Release(wb);
|
||||
IOleControl_Release(control);
|
||||
|
|
Loading…
Reference in a new issue