Author: cwittich
Date: Fri Feb 13 12:47:09 2009
New Revision: 39594
URL:
http://svn.reactos.org/svn/reactos?rev=39594&view=rev
Log:
sync mshtml and shdocvw winetests with wine 1.1.15
Modified:
trunk/rostests/winetests/mshtml/dom.c
trunk/rostests/winetests/mshtml/script.c
trunk/rostests/winetests/shdocvw/webbrowser.c
Modified: trunk/rostests/winetests/mshtml/dom.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/dom.c?re…
==============================================================================
--- trunk/rostests/winetests/mshtml/dom.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/dom.c [iso-8859-1] Fri Feb 13 12:47:09 2009
@@ -307,6 +307,8 @@
&IID_IDispatchEx,
&IID_IHTMLStyle,
&IID_IHTMLStyle2,
+ &IID_IHTMLStyle3,
+ &IID_IHTMLStyle4,
NULL
};
@@ -2411,6 +2413,7 @@
float f;
BSTR sOverflowDefault;
BSTR sDefault;
+ VARIANT vDefault;
test_disp((IUnknown*)style, &DIID_DispHTMLStyle);
test_ifaces((IUnknown*)style, style_iids);
@@ -2428,6 +2431,82 @@
hres = IHTMLStyle_get_fontWeight(style, &str);
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);
@@ -2482,10 +2561,32 @@
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);
@@ -2903,6 +3004,29 @@
str = a2bstr("bordertopstyle");
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);
Modified: trunk/rostests/winetests/mshtml/script.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/script.c…
==============================================================================
--- trunk/rostests/winetests/mshtml/script.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/script.c [iso-8859-1] Fri Feb 13 12:47:09 2009
@@ -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 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_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_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;
Modified: trunk/rostests/winetests/shdocvw/webbrowser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shdocvw/webbrow…
==============================================================================
--- trunk/rostests/winetests/shdocvw/webbrowser.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/shdocvw/webbrowser.c [iso-8859-1] Fri Feb 13 12:47:09 2009
@@ -68,6 +68,9 @@
ok(called_ ## func || broken(!called_ ## func), "expected " #func
"\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
+
+#define CLEAR_CALLED(func) \
+ expect_ ## func = called_ ## func = FALSE
DEFINE_EXPECT(GetContainer);
DEFINE_EXPECT(Site_GetWindow);
@@ -1773,6 +1776,35 @@
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 @@
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);