Author: akhaldi
Date: Sat Mar 28 15:53:45 2015
New Revision: 66929
URL:
http://svn.reactos.org/svn/reactos?rev=66929&view=rev
Log:
[MSHTML_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/rostests/winetests/mshtml/activex.c
trunk/rostests/winetests/mshtml/dom.c
trunk/rostests/winetests/mshtml/events.c
trunk/rostests/winetests/mshtml/events.html
trunk/rostests/winetests/mshtml/externscr.js
trunk/rostests/winetests/mshtml/htmldoc.c
trunk/rostests/winetests/mshtml/jstest.html
trunk/rostests/winetests/mshtml/nav_test.html
trunk/rostests/winetests/mshtml/protocol.c
trunk/rostests/winetests/mshtml/rsrc.rc
trunk/rostests/winetests/mshtml/script.c
trunk/rostests/winetests/mshtml/style.c
Modified: trunk/rostests/winetests/mshtml/activex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/activex.…
==============================================================================
--- trunk/rostests/winetests/mshtml/activex.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/activex.c [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -217,6 +217,7 @@
static IOleClientSite *client_site;
static IDispatch *sink_disp;
static READYSTATE plugin_readystate = READYSTATE_UNINITIALIZED;
+static BOOL have_container;
static void set_plugin_readystate(READYSTATE state)
{
@@ -468,15 +469,19 @@
ok(!container->pUnkEventSink, "container->pUnkEventSink != NULL\n");
ok(container->dwAmbientFlags ==
(QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE),
"container->dwAmbientFlags = %x\n", container->dwAmbientFlags);
- ok(!container->colorFore, "container->colorFore == 0\n"); /* FIXME
*/
+ if(have_container)
+ ok(!container->colorFore, "container->colorFore = %d\n",
container->colorFore); /* FIXME */
todo_wine
ok(container->colorBack, "container->colorBack == 0\n"); /* FIXME */
- todo_wine
- ok(container->pFont != NULL, "container->pFont == NULL\n");
+ if(have_container)
+ todo_wine ok(container->pFont != NULL, "container->pFont ==
NULL\n");
+ else
+ ok(!container->pFont, "container->pFont = %p\n",
container->pFont);
todo_wine
ok(container->pUndoMgr != NULL, "container->pUndoMgr == NULL\n");
ok(!container->dwAppearance, "container->dwAppearance = %x\n",
container->dwAppearance);
- ok(!container->lcid, "container->lcid = %x\n", container->lcid);
+ if(have_container)
+ ok(!container->lcid, "container->lcid = %x\n",
container->lcid);
ok(!container->hpal, "container->hpal = %p\n", container->hpal);
ok(!container->pBindHost, "container->pBindHost != NULL\n");
ok(!container->pOleControlSite, "container->pOleControlSite !=
NULL\n");
@@ -2366,6 +2371,7 @@
activex_refcnt = 0;
no_quickact = behavior == TEST_NOQUICKACT || behavior == TEST_DISPONLY;
+ have_container = TRUE;
}
static void test_event_call(void)
@@ -2605,6 +2611,73 @@
release_doc(doc);
}
+static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa)
+{
+ IHTMLWindow2 *window;
+ BSTR code, lang;
+ VARIANT v;
+ HRESULT hres;
+
+ hres = IHTMLDocument2_get_parentWindow(doc, &window);
+ ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
+
+ code = a2bstr(codea);
+ lang = a2bstr(langa);
+
+ hres = IHTMLWindow2_execScript(window, code, lang, &v);
+ ok(hres == S_OK, "execScript failed: %08x\n", hres);
+ SysFreeString(lang);
+ VariantClear(&v);
+
+ IHTMLWindow2_Release(window);
+}
+
+static void test_create_element(void)
+{
+ IHTMLDocument2 *doc;
+
+ init_test(TEST_FLASH);
+
+ doc = create_doc("<html></html>");
+
+ have_container = FALSE;
+
+ SET_EXPECT(CreateInstance);
+ SET_EXPECT(FreezeEvents_TRUE);
+ SET_EXPECT(QuickActivate);
+ SET_EXPECT(IPersistPropertyBag_InitNew);
+ SET_EXPECT(Invoke_READYSTATE);
+ SET_EXPECT(FreezeEvents_FALSE);
+
+ test_exec_script(doc,
+ "var test_elem =
document.createElement('object');"
+ "test_elem.classid =
'CLSID:178fc163-f585-4e24-9c13-4bb7f6680746';",
+ "javascript");
+
+ CHECK_CALLED(CreateInstance);
+ todo_wine CHECK_CALLED(FreezeEvents_TRUE);
+ CHECK_CALLED(QuickActivate);
+ CHECK_CALLED(IPersistPropertyBag_InitNew);
+ CHECK_CALLED(Invoke_READYSTATE);
+ todo_wine CHECK_CALLED(FreezeEvents_FALSE);
+
+ have_container = TRUE;
+
+ SET_EXPECT(DoVerb);
+ test_exec_script(doc,
+ "document.body.appendChild(test_elem);",
+ "javascript");
+ todo_wine CHECK_CALLED(DoVerb);
+
+ SET_EXPECT(InPlaceDeactivate);
+ SET_EXPECT(Close);
+ SET_EXPECT(SetClientSite_NULL);
+ release_doc(doc);
+ todo_wine CHECK_CALLED(InPlaceDeactivate);
+ CHECK_CALLED(Close);
+ CHECK_CALLED(SetClientSite_NULL);
+}
+
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
return DefWindowProcW(hwnd, msg, wParam, lParam);
@@ -2741,6 +2814,8 @@
test_nooleobj_ax();
trace("Testing event object binding...\n");
test_event_binding();
+ trace("Testing createElement(object)...\n");
+ test_create_element();
init_registry(FALSE);
}else {
skip("Could not register ActiveX\n");
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] Sat Mar 28 15:53:45 2015
@@ -264,6 +264,7 @@
&IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLDOMTextNode,
+ &IID_IHTMLDOMTextNode2,
NULL
};
@@ -381,6 +382,7 @@
ELEM_IFACES,
&IID_IHTMLFormElement,
&IID_IConnectionPointContainer,
+ &DIID_DispHTMLFormElement,
NULL
};
@@ -477,6 +479,20 @@
return lstrcmpA(stra, buf);
}
+static BOOL is_prefix_wa(const WCHAR *strw, const char *prefix)
+{
+ int len, prefix_len;
+ CHAR buf[512];
+
+ len = WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL)-1;
+ prefix_len = lstrlenA(prefix);
+ if(len < prefix_len)
+ return FALSE;
+
+ buf[prefix_len] = 0;
+ return !lstrcmpA(buf, prefix);
+}
+
static BSTR a2bstr(const char *str)
{
BSTR ret;
@@ -858,6 +874,17 @@
return text;
}
+#define get_text2_iface(u) _get_text2_iface(__LINE__,u)
+static IHTMLDOMTextNode2 *_get_text2_iface(unsigned line, IUnknown *unk)
+{
+ IHTMLDOMTextNode2 *text2;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMTextNode2, (void**)&text2);
+ ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMTextNode2:
%08x\n", hres);
+ return text2;
+}
+
#define get_comment_iface(u) _get_comment_iface(__LINE__,u)
static IHTMLCommentElement *_get_comment_iface(unsigned line, IUnknown *unk)
{
@@ -1479,6 +1506,37 @@
SysFreeString(str);
}
+#define test_anchor_search(a,h,n) _test_anchor_search(__LINE__,a,h,n)
+static void _test_anchor_search(unsigned line, IUnknown *elem, const char *search, BOOL
allowbroken)
+{
+ IHTMLAnchorElement *anchor = _get_anchor_iface(line, elem);
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLAnchorElement_get_search(anchor, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_search failed: %08x\n", hres);
+ if ( ! str && allowbroken)
+ win_skip("skip ie6 incorrect behavior\n");
+ else if(search)
+ ok_(__FILE__,line)(!strcmp_wa(str, search), "search = %s, expected
%s\n", wine_dbgstr_w(str), search);
+ else
+ ok_(__FILE__,line)(!str, "search = %s, expected NULL\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+}
+
+#define test_anchor_put_search(a,h) _test_anchor_put_search(__LINE__,a,h)
+static void _test_anchor_put_search(unsigned line, IUnknown *unk, const char *search)
+{
+ IHTMLAnchorElement *anchor = _get_anchor_iface(line, unk);
+ BSTR str;
+ HRESULT hres;
+
+ str = search ? a2bstr(search) : NULL;
+ hres = IHTMLAnchorElement_put_search(anchor, str);
+ ok_(__FILE__,line)(hres == S_OK, "put_search failed: %08x\n", hres);
+ SysFreeString(str);
+}
+
#define test_anchor_hash(a,h) _test_anchor_hash(__LINE__,a,h)
static void _test_anchor_hash(unsigned line, IHTMLElement *elem, const char *exhash)
{
@@ -1638,6 +1696,20 @@
ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres);
ok_(__FILE__,line)(!strcmp_wa(type, "textarea"), "type = %s, expected
textarea\n", wine_dbgstr_w(type));
SysFreeString(type);
+}
+
+#define get_textarea_form(t) _get_textarea_form(__LINE__,t)
+static IHTMLFormElement *_get_textarea_form(unsigned line, IUnknown *unk)
+{
+ IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk);
+ IHTMLFormElement *form;
+ HRESULT hres;
+
+ hres = IHTMLTextAreaElement_get_form(textarea, &form);
+ IHTMLTextAreaElement_Release(textarea);
+ ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres);
+
+ return form;
}
#define test_comment_text(c,t) _test_comment_text(__LINE__,c,t)
@@ -2100,6 +2172,17 @@
test_range_inrange(range1, range2, VARIANT_TRUE);
test_range_inrange(range2, range1, VARIANT_TRUE);
}
+}
+
+#define test_range_paste_html(a,b) _test_range_paste_html(__LINE__,a,b)
+static void _test_range_paste_html(unsigned line, IHTMLTxtRange *range, const char
*html)
+{
+ BSTR str = a2bstr(html);
+ HRESULT hres;
+
+ hres = IHTMLTxtRange_pasteHTML(range, str);
+ ok_(__FILE__,line)(hres == S_OK, "pasteHTML failed: %08x\n", hres);
+ SysFreeString(str);
}
#define test_range_parent(r,t) _test_range_parent(__LINE__,r,t)
@@ -2455,6 +2538,18 @@
ok_(__FILE__,line)(b == exval, "contains returned %x, expected %x\n", b,
exval);
}
+#define test_elem_istextedit(a,b) _test_elem_istextedit(__LINE__,a,b)
+static void _test_elem_istextedit(unsigned line, IHTMLElement *elem, VARIANT_BOOL exval)
+{
+ VARIANT_BOOL b;
+ HRESULT hres;
+
+ b = 100;
+ hres = IHTMLElement_get_isTextEdit(elem, &b);
+ ok_(__FILE__,line)(hres == S_OK, "isTextEdit failed: %08x\n", hres);
+ ok_(__FILE__,line)(b == exval, "isTextEdit = %x\n", b);
+}
+
#define get_first_child(n) _get_first_child(__LINE__,n)
static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk)
{
@@ -2638,6 +2733,19 @@
SysFreeString(str);
}
+#define text_append_data(a,b) _text_append_data(__LINE__,a,b)
+static void _text_append_data(unsigned line, IUnknown *unk, const char *data)
+{
+ IHTMLDOMTextNode2 *text = _get_text2_iface(line, unk);
+ BSTR str = a2bstr(data);
+ HRESULT hres;
+
+ hres = IHTMLDOMTextNode2_appendData(text, str);
+ ok_(__FILE__,line)(hres == S_OK, "appendData failed: %08x\n", hres);
+ IHTMLDOMTextNode2_Release(text);
+ SysFreeString(str);
+}
+
#define test_select_set_disabled(i,b) _test_select_set_disabled(__LINE__,i,b)
static void _test_select_set_disabled(unsigned line, IHTMLSelectElement *select,
VARIANT_BOOL b)
{
@@ -2647,6 +2755,39 @@
ok_(__FILE__,line) (hres == S_OK, "get_disabled failed: %08x\n", hres);
_test_select_get_disabled(line, select, b);
+}
+
+#define test_elem_dir(u,n) _test_elem_dir(__LINE__,u,n)
+static void _test_elem_dir(unsigned line, IUnknown *unk, const char *exdir)
+{
+ IHTMLElement2 *elem = _get_elem2_iface(line, unk);
+ BSTR dir;
+ HRESULT hres;
+
+ hres = IHTMLElement2_get_dir(elem, &dir);
+ IHTMLElement2_Release(elem);
+ ok_(__FILE__, line) (hres == S_OK, "get_dir failed: %08x\n", hres);
+ if(exdir)
+ ok_(__FILE__, line) (!strcmp_wa(dir, exdir), "got dir: %s, expected
%s\n", wine_dbgstr_w(dir), exdir);
+ else
+ ok_(__FILE__, line) (!dir, "got dir: %s, expected NULL\n",
wine_dbgstr_w(dir));
+
+ SysFreeString(dir);
+}
+
+#define set_elem_dir(u,n) _set_elem_dir(__LINE__,u,n)
+static void _set_elem_dir(unsigned line, IUnknown *unk, const char *dira)
+{
+ IHTMLElement2 *elem = _get_elem2_iface(line, unk);
+ BSTR dir = a2bstr(dira);
+ HRESULT hres;
+
+ hres = IHTMLElement2_put_dir(elem, dir);
+ IHTMLElement2_Release(elem);
+ ok_(__FILE__, line) (hres == S_OK, "put_dir failed: %08x\n", hres);
+ SysFreeString(dir);
+
+ _test_elem_dir(line, unk, dira);
}
#define elem_get_scroll_height(u) _elem_get_scroll_height(__LINE__,u)
@@ -3107,6 +3248,36 @@
SysFreeString(id);
}
+#define test_elem_language(e,i) _test_elem_language(__LINE__,e,i)
+static void _test_elem_language(unsigned line, IHTMLElement *elem, const char *exlang)
+{
+ BSTR lang = (void*)0xdeadbeef;
+ HRESULT hres;
+
+ hres = IHTMLElement_get_language(elem, &lang);
+ ok_(__FILE__,line) (hres == S_OK, "get_language failed: %08x\n", hres);
+
+ if(exlang)
+ ok_(__FILE__,line) (!strcmp_wa(lang, exlang), "unexpected language
%s\n", wine_dbgstr_w(lang));
+ else
+ ok_(__FILE__,line) (!lang, "language=%s\n", wine_dbgstr_w(lang));
+
+ SysFreeString(lang);
+}
+
+#define set_elem_language(e,i) _set_elem_language(__LINE__,e,i)
+static void _set_elem_language(unsigned line, IHTMLElement *elem, const char *lang)
+{
+ BSTR str = a2bstr(lang);
+ HRESULT hres;
+
+ hres = IHTMLElement_put_language(elem, str);
+ ok_(__FILE__,line) (hres == S_OK, "get_language failed: %08x\n", hres);
+ SysFreeString(str);
+
+ _test_elem_language(line, elem, lang);
+}
+
#define test_elem_put_id(u,i) _test_elem_put_id(__LINE__,u,i)
static void _test_elem_put_id(unsigned line, IUnknown *unk, const char *new_id)
{
@@ -4742,22 +4913,47 @@
return range;
}
+#define range_duplicate(a) _range_duplicate(__LINE__,a)
+static IHTMLTxtRange *_range_duplicate(unsigned line, IHTMLTxtRange *range)
+{
+ IHTMLTxtRange *ret;
+ HRESULT hres;
+
+ hres = IHTMLTxtRange_duplicate(range, &ret);
+ ok_(__FILE__,line)(hres == S_OK, "duplicate failed: %08x\n", hres);
+
+ return ret;
+}
+
+#define test_range_set_end_point(a,b,c,d) _test_range_set_end_point(__LINE__,a,b,c,d)
+static void _test_range_set_end_point(unsigned line, IHTMLTxtRange *range, const char
*how,
+ IHTMLTxtRange *ref_range, HRESULT exhres)
+{
+ BSTR str = a2bstr(how);
+ HRESULT hres;
+
+ hres = IHTMLTxtRange_setEndPoint(range, str, ref_range);
+ ok_(__FILE__,line)(hres == exhres, "setEndPoint failed: %08x, expected
%08x\n", hres, exhres);
+ SysFreeString(str);
+}
+
static void test_txtrange(IHTMLDocument2 *doc)
{
IHTMLTxtRange *body_range, *range, *range2;
IHTMLSelectionObject *selection;
IDispatch *disp_range;
+ IHTMLElement *body;
HRESULT hres;
body_range = test_create_body_range(doc);
+ test_disp((IUnknown*)body_range, &IID_IHTMLTxtRange, "[object]");
+
test_range_text(body_range, "test abc 123\r\nit's text");
- hres = IHTMLTxtRange_duplicate(body_range, &range);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
-
- hres = IHTMLTxtRange_duplicate(body_range, &range2);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
+ range = range_duplicate(body_range);
+ range2 = range_duplicate(body_range);
+
test_range_isequal(range, range2, VARIANT_TRUE);
test_range_text(range, "test abc 123\r\nit's text");
@@ -4797,8 +4993,7 @@
IHTMLTxtRange_Release(range);
- hres = IHTMLTxtRange_duplicate(body_range, &range);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
+ range = range_duplicate(body_range);
test_range_text(range, "test abc 123\r\nit's text");
test_range_move(range, characterW, 3, 3);
@@ -4816,8 +5011,7 @@
IHTMLTxtRange_Release(range);
- hres = IHTMLTxtRange_duplicate(body_range, &range);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
+ range = range_duplicate(body_range);
test_range_move(range, wordW, 1, 1);
test_range_moveend(range, characterW, 2, 2);
@@ -4843,8 +5037,7 @@
IHTMLTxtRange_Release(range);
- hres = IHTMLTxtRange_duplicate(body_range, &range);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
+ range = range_duplicate(body_range);
test_range_move(range, wordW, 2, 2);
test_range_moveend(range, characterW, 2, 2);
@@ -4868,8 +5061,7 @@
IHTMLTxtRange_Release(range);
- hres = IHTMLTxtRange_duplicate(body_range, &range);
- ok(hres == S_OK, "duplicate failed: %08x\n", hres);
+ range = range_duplicate(body_range);
test_range_collapse(range, TRUE);
test_range_expand(range, wordW, VARIANT_TRUE, "test ");
@@ -4892,10 +5084,11 @@
test_range_text(range, NULL);
IHTMLTxtRange_Release(range);
- IHTMLTxtRange_Release(body_range);
hres = IHTMLDocument2_get_selection(doc, &selection);
ok(hres == S_OK, "IHTMLDocument2_get_selection failed: %08x\n", hres);
+
+ test_disp((IUnknown*)selection, &IID_IHTMLSelectionObject,
"[object]");
hres = IHTMLSelectionObject_createRange(selection, &disp_range);
ok(hres == S_OK, "IHTMLSelectionObject_createRange failed: %08x\n", hres);
@@ -4928,7 +5121,63 @@
test_range_moveend(range, characterW, 2, 2);
test_range_text(range, "ab");
+ body = doc_get_body(doc);
+
+ hres = IHTMLTxtRange_moveToElementText(range, body);
+ ok(hres == S_OK, "moveToElementText failed: %08x\n", hres);
+
+ test_range_text(range, "abc xyz abc 123\r\nit's text");
+ test_range_parent(range, ET_BODY);
+
+ test_range_move(range, wordW, 1, 1);
+ test_range_moveend(range, characterW, 12, 12);
+ test_range_text(range, "xyz abc 123");
+
+ test_range_collapse(range, VARIANT_TRUE);
+ test_range_paste_html(range, "<br>paste<br>");
+ test_range_text(range, NULL);
+
+ test_range_moveend(range, characterW, 3, 3);
+ test_range_text(range, "xyz");
+
+ hres = IHTMLTxtRange_moveToElementText(range, body);
+ ok(hres == S_OK, "moveToElementText failed: %08x\n", hres);
+
+ test_range_text(range, "abc \r\npaste\r\nxyz abc 123\r\nit's text");
+
+ test_range_move(range, wordW, 2, 2);
+ test_range_collapse(range, VARIANT_TRUE);
+ test_range_moveend(range, characterW, 5, 5);
+ test_range_text(range, "paste");
+
+ range2 = range_duplicate(range);
+
+ test_range_set_end_point(range, "starttostart", body_range, S_OK);
+ test_range_text(range, "abc \r\npaste");
+
+ test_range_set_end_point(range, "endtoend", body_range, S_OK);
+ test_range_text(range, "abc \r\npaste\r\nxyz abc 123\r\nit's text");
+
+ test_range_set_end_point(range, "starttoend", range2, S_OK);
+ test_range_text(range, "\r\nxyz abc 123\r\nit's text");
+
+ test_range_set_end_point(range, "starttostart", body_range, S_OK);
+ test_range_set_end_point(range, "endtostart", range2, S_OK);
+ test_range_text(range, "abc ");
+
+ test_range_set_end_point(range, "starttoend", body_range, S_OK);
+ test_range_text(range, "paste\r\nxyz abc 123\r\nit's text");
+
+ test_range_set_end_point(range, "EndToStart", body_range, S_OK);
+ test_range_text(range, "abc ");
+
+ test_range_set_end_point(range, "xxx", body_range, E_INVALIDARG);
+
IHTMLTxtRange_Release(range);
+ IHTMLTxtRange_Release(range2);
+ IHTMLTxtRange_Release(body_range);
+ IHTMLElement_Release(body);
+
}
static void test_txtrange2(IHTMLDocument2 *doc)
@@ -5118,6 +5367,27 @@
IHTMLFrameBase_Release(fbase);
}
+#define test_framebase_src(a,b) _test_framebase_src(__LINE__,a,b)
+static void _test_framebase_src(unsigned line, IHTMLElement *elem, const char *src)
+{
+ BSTR str = (void*)0xdeadbeef;
+ IHTMLFrameBase *fbase;
+ HRESULT hres;
+
+ hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLFrameBase,
(void**)&fbase);
+ ok(hres == S_OK, "Could not get IHTMLFrameBase interface: 0x%08x\n",
hres);
+
+ hres = IHTMLFrameBase_get_src(fbase, &str);
+ ok_(__FILE__,line)(hres == S_OK, "IHTMLFrameBase_get_src failed: 0x%08x\n",
hres);
+ if(src)
+ ok_(__FILE__,line)(!strcmp_wa(str, src), "src = %s, expected %s\n",
wine_dbgstr_w(str), src);
+ else
+ ok_(__FILE__,line)(!str, "src = %s, expected NULL\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ IHTMLFrameBase_Release(fbase);
+}
+
#define test_framebase_marginheight(a,b) _test_framebase_marginheight(__LINE__,a,b)
static void _test_framebase_marginheight(unsigned line, IHTMLFrameBase *framebase, const
char *exval)
{
@@ -5549,6 +5819,9 @@
ok(!l, "scrollTop = %d\n", l);
elem_get_scroll_left((IUnknown*)body);
+ test_elem_dir((IUnknown*)body, NULL);
+ set_elem_dir((IUnknown*)body, "ltr");
+
/* get_text tests */
hres = IHTMLBodyElement_get_text(body, &v);
ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres);
@@ -5791,8 +6064,10 @@
IHTMLElement2 *elem2;
IHTMLElement *elem;
IHTMLStyle *style;
+ VARIANT v;
BSTR str;
LONG l;
+ VARIANT_BOOL b;
HRESULT hres;
IHTMLElementCollection *collection;
@@ -5858,6 +6133,8 @@
test_default_body(body);
test_body_funs(body);
IHTMLBodyElement_Release(body);
+
+ test_elem_istextedit(elem, VARIANT_TRUE);
hres = IHTMLElement_get_style(elem, &style);
ok(hres == S_OK, "get_style failed: %08x\n", hres);
@@ -5914,6 +6191,22 @@
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLFiltersCollection,
(void**)&body);
ok(hres == E_NOINTERFACE, "got interface IHTMLFiltersCollection\n");
+
+ str = a2bstr("xxx");
+ b = 100;
+ V_VT(&v) = VT_EMPTY;
+ hres = IHTMLDocument2_execCommand(doc, str, FALSE, v, &b);
+ ok(hres == OLECMDERR_E_NOTSUPPORTED || hres == E_INVALIDARG,
+ "execCommand failed: %08x, expected OLECMDERR_E_NOTSUPPORTED or
E_INVALIDARG\n", hres);
+ SysFreeString(str);
+
+ str = a2bstr("respectvisibilityindesign");
+ b = 100;
+ V_VT(&v) = VT_BOOL;
+ V_BOOL(&v) = VARIANT_TRUE;
+ hres = IHTMLDocument2_execCommand(doc, str, FALSE, v, &b);
+ ok(hres == S_OK, "execCommand failed: %08x, expected
DRAGDROP_E_NOTREGISTERED\n", hres);
+ SysFreeString(str);
test_default_selection(doc);
test_doc_title(doc, "");
@@ -5985,6 +6278,8 @@
{
test_button_name(elem, NULL);
set_button_name(elem, "button name");
+
+ test_elem_istextedit(elem, VARIANT_TRUE);
}
#define test_tr_possess(e,r,l,i) _test_tr_possess(__LINE__,e,r,l,i)
@@ -6259,6 +6554,23 @@
VariantClear(&v);
}
+#define test_table_cell_padding(a,b) _test_table_cell_padding(__LINE__,a,b)
+static void _test_table_cell_padding(unsigned line, IHTMLTable *table, const char
*exstr)
+{
+ VARIANT v;
+ HRESULT hres;
+
+ V_VT(&v) = VT_ERROR;
+ hres = IHTMLTable_get_cellPadding(table, &v);
+ ok_(__FILE__,line)(hres == S_OK, "get_cellPadding failed: %08x\n", hres);
+ ok_(__FILE__,line)(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n",
V_VT(&v));
+ if(exstr)
+ ok_(__FILE__,line)(!strcmp_wa(V_BSTR(&v), exstr), "cellPadding = %s,
expected %s\n", wine_dbgstr_w(V_BSTR(&v)), exstr);
+ else
+ ok_(__FILE__,line)(!V_BSTR(&v), "cellPadding = %s, expected
NULL\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+}
+
static void test_table_modify(IHTMLTable *table)
{
IDispatch *disp;
@@ -6360,6 +6672,27 @@
ok(hres == S_OK, "put_cellSpacing = %08x\n", hres);
test_table_cell_spacing(table, "11");
VariantClear(&v);
+
+ test_table_cell_padding(table, NULL);
+
+ V_VT(&v) = VT_I4;
+ V_I4(&v) = 10;
+ hres = IHTMLTable_put_cellPadding(table, v);
+ ok(hres == S_OK, "put_cellPadding = %08x\n", hres);
+ test_table_cell_padding(table, "10");
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("11");
+ hres = IHTMLTable_put_cellPadding(table, v);
+ ok(hres == S_OK, "put_cellPadding = %08x\n", hres);
+ test_table_cell_padding(table, "11");
+ VariantClear(&v);
+
+ V_VT(&v) = VT_R8;
+ V_R8(&v) = 5;
+ hres = IHTMLTable_put_cellPadding(table, v);
+ ok(hres == S_OK, "put_cellPadding = %08x\n", hres);
+ test_table_cell_padding(table, "5");
bstr = a2bstr("left");
hres = IHTMLTable_put_align(table, bstr);
@@ -6454,7 +6787,6 @@
ok(hres == S_OK, "get_width = %08x\n", hres);
ok(!strcmp_wa(V_BSTR(&v), "11"), "Expected 11, got %s\n",
wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
-
bstr = a2bstr("box");
hres = IHTMLTable_put_frame(table, bstr);
@@ -6685,6 +7017,7 @@
set_iframe_width(elem, "150px");
set_iframe_width(elem, "70%");
test_iframe_width(elem, "70%");
+ test_framebase_src(elem, "about:blank");
str = a2bstr("text/html");
V_VT(&errv) = VT_ERROR;
@@ -6720,6 +7053,43 @@
IHTMLDocument2_Release(content_doc);
}
+#define test_stylesheet_csstext(a,b,c) _test_stylesheet_csstext(__LINE__,a,b,c)
+static void _test_stylesheet_csstext(unsigned line, IHTMLStyleSheet *stylesheet, const
char *exstr, BOOL is_todo)
+{
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLStyleSheet_get_cssText(stylesheet, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_cssText failed: %08x\n", hres);
+ if(!is_todo) {
+ if(exstr)
+ ok_(__FILE__,line)(is_prefix_wa(str, exstr), "cssText = %s\n",
wine_dbgstr_w(str));
+ else
+ ok_(__FILE__,line)(!str, "cssText = %s\n", wine_dbgstr_w(str));
+ }else todo_wine {
+ if(exstr)
+ ok_(__FILE__,line)(is_prefix_wa(str, exstr), "cssText = %s\n",
wine_dbgstr_w(str));
+ else
+ ok_(__FILE__,line)(!str, "cssText = %s\n", wine_dbgstr_w(str));
+ }
+
+ SysFreeString(str);
+}
+
+#define set_stylesheet_csstext(a,b,c) _set_stylesheet_csstext(__LINE__,a,b,c)
+static void _set_stylesheet_csstext(unsigned line, IHTMLStyleSheet *stylesheet, const
char *csstext, BOOL is_todo)
+{
+ BSTR str = a2bstr(csstext);
+ HRESULT hres;
+
+ hres = IHTMLStyleSheet_put_cssText(stylesheet, str);
+ if(!is_todo)
+ ok_(__FILE__,line)(hres == S_OK, "put_cssText failed: %08x\n", hres);
+ else
+ todo_wine ok_(__FILE__,line)(hres == S_OK, "put_cssText failed:
%08x\n", hres);
+ SysFreeString(str);
+}
+
static void test_stylesheet(IDispatch *disp)
{
IHTMLStyleSheetRulesCollection *col = NULL;
@@ -6744,6 +7114,14 @@
ok(hres == S_OK, "get_href failed: %08x\n", hres);
ok(href == NULL, "got href != NULL\n");
SysFreeString(href);
+
+ test_stylesheet_csstext(stylesheet, ".body {", FALSE);
+ set_stylesheet_csstext(stylesheet, ".div { margin-right: 1px; }\n.body {
margin-right: 2px; }", TRUE);
+ test_stylesheet_csstext(stylesheet, ".div {", TRUE);
+ set_stylesheet_csstext(stylesheet, "", FALSE);
+ test_stylesheet_csstext(stylesheet, NULL, FALSE);
+ set_stylesheet_csstext(stylesheet, ".div { margin-right: 1px; }", FALSE);
+ test_stylesheet_csstext(stylesheet, ".div {", FALSE);
IHTMLStyleSheet_Release(stylesheet);
}
@@ -6989,6 +7367,7 @@
test_plugins_col(doc);
elem = get_doc_elem(doc);
+ test_elem_istextedit(elem, VARIANT_FALSE);
test_elem_all((IUnknown*)elem, all_types+1,
sizeof(all_types)/sizeof(all_types[0])-1);
IHTMLElement_Release(elem);
@@ -7008,6 +7387,7 @@
test_elem_tabindex((IUnknown*)elem, 0);
test_elem_set_tabindex((IUnknown*)elem, 1);
test_elem_filters((IUnknown*)elem);
+ test_elem_istextedit(elem, VARIANT_FALSE);
node = test_node_get_parent((IUnknown*)elem);
ok(node != NULL, "node == NULL\n");
@@ -7068,6 +7448,7 @@
test_select_elem(select);
+ test_elem_istextedit(elem, VARIANT_FALSE);
test_elem_title((IUnknown*)select, NULL);
test_elem_set_title((IUnknown*)select, "Title");
test_elem_title((IUnknown*)select, "Title");
@@ -7103,6 +7484,9 @@
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLScriptElement,
(void**)&script);
ok(hres == S_OK, "Could not get IHTMLScriptElement interface: %08x\n",
hres);
+
+ test_elem_language(elem, NULL);
+ test_elem_istextedit(elem, VARIANT_FALSE);
if(hres == S_OK)
{
@@ -7143,6 +7527,9 @@
}
IHTMLScriptElement_Release(script);
+
+ set_elem_language(elem, "vbscript");
+ set_elem_language(elem, "xxx");
}
elem = get_elem_by_id(doc, "in", TRUE);
@@ -7163,6 +7550,7 @@
test_input_get_disabled(input, VARIANT_FALSE);
test_elem_client_size((IUnknown*)elem);
test_input_type(input, "text");
+ test_elem_istextedit(elem, VARIANT_TRUE);
test_node_get_value_str((IUnknown*)elem, NULL);
test_node_put_value_str((IUnknown*)elem, "test");
@@ -7331,8 +7719,25 @@
test_anchor_put_name((IUnknown*)elem, NULL);
test_anchor_put_name((IUnknown*)elem, "x");
- test_anchor_put_href((IUnknown*)elem, "http://test/#hash");
+ test_anchor_put_href((IUnknown*)elem, "http://test/?how#hash");
test_anchor_hash(elem, "#hash");
+ test_anchor_search((IUnknown*)elem, "?how", FALSE);
+
+ test_anchor_put_search((IUnknown*)elem, "?word=press");
+ test_anchor_search((IUnknown*)elem, "?word=press", FALSE);
+ test_anchor_put_search((IUnknown*)elem, "?????word???press");
+ test_anchor_search((IUnknown*)elem, "?????word???press", FALSE);
+
+ test_anchor_put_search((IUnknown*)elem, "?q=%E4%BD%A0%E5%A5%BD"); /*
encoded cjk characters */
+ test_anchor_search((IUnknown*)elem, "?q=%E4%BD%A0%E5%A5%BD", FALSE);
+
+ test_anchor_put_search((IUnknown*)elem, "?how?old=are");
+ test_anchor_search((IUnknown*)elem, "?how?old=are", FALSE);
+
+ /* due to incorrect behavior of ie6, search string without leading "?"
is interpreted
+ as part of the pathname, and cannot be accessed by get_search. */
+ test_anchor_put_search((IUnknown*)elem, "word=abc");
+ test_anchor_search((IUnknown*)elem, "?word=abc", TRUE);
IHTMLElement_Release(elem);
}
@@ -7515,6 +7920,9 @@
IHTMLElement_Release(elem2);
IHTMLElement_Release(elem);
+ hres = IHTMLDocument3_recalc(doc3, VARIANT_TRUE);
+ ok(hres == S_OK, "recalc failed: %08x\n", hres);
+
IHTMLDocument3_Release(doc3);
elem = get_elem_by_id(doc, "s", TRUE);
@@ -7723,12 +8131,37 @@
test_elem_set_innerhtml((IUnknown*)div, "<textarea
id=\"ta\"></textarea>");
elem = get_elem_by_id(doc, "ta", TRUE);
if(elem) {
+ IHTMLFormElement *form;
+
test_textarea_value((IUnknown*)elem, NULL);
test_textarea_put_value((IUnknown*)elem, "test");
test_textarea_readonly((IUnknown*)elem, VARIANT_FALSE);
test_textarea_put_readonly((IUnknown*)elem, VARIANT_TRUE);
test_textarea_put_readonly((IUnknown*)elem, VARIANT_FALSE);
test_textarea_type((IUnknown*)elem);
+
+ form = get_textarea_form((IUnknown*)elem);
+ ok(!form, "form = %p\n", form);
+
+ test_elem_istextedit(elem, VARIANT_TRUE);
+
+ IHTMLElement_Release(elem);
+ }
+
+ test_elem_set_innerhtml((IUnknown*)div, "<form
id=\"fid\"><textarea
id=\"ta\"></textarea></form>");
+ elem = get_elem_by_id(doc, "ta", TRUE);
+ if(elem) {
+ IHTMLFormElement *form;
+
+ elem2 = get_elem_by_id(doc, "fid", TRUE);
+ ok(elem2 != NULL, "elem2 == NULL\n");
+
+ form = get_textarea_form((IUnknown*)elem);
+ ok(form != NULL, "form = NULL\n");
+ ok(iface_cmp((IUnknown*)form, (IUnknown*)elem2), "form != elem2\n");
+
+ IHTMLFormElement_Release(form);
+ IHTMLElement_Release(elem2);
IHTMLElement_Release(elem);
}
@@ -7835,6 +8268,11 @@
test_text_data((IUnknown*)node, "abc");
set_text_data((IUnknown*)node, "test");
test_text_data((IUnknown*)node, "test");
+ text_append_data((IUnknown*)node, " append");
+ test_text_data((IUnknown*)node, "test append");
+ text_append_data((IUnknown*)node, NULL);
+ test_text_data((IUnknown*)node, "test append");
+ set_text_data((IUnknown*)node, "test");
V_VT(&var) = VT_NULL;
node2 = test_node_insertbefore((IUnknown*)body, node, &var);
@@ -8338,6 +8776,7 @@
test_framebase_put_name(elem, "frame name");
test_framebase_put_name(elem, NULL);
test_framebase_put_name(elem, "nm1");
+ test_framebase_src(elem, "about:blank");
IHTMLElement_Release(elem);
/* get_name with no name attr */
Modified: trunk/rostests/winetests/mshtml/events.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/events.c…
==============================================================================
--- trunk/rostests/winetests/mshtml/events.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/events.c [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -98,7 +98,6 @@
} xy_test_t;
static const xy_test_t no_xy = {-10,-10,-10,-10};
-static const xy_test_t zero_xy = {0,0,0,0};
static const char empty_doc_str[] =
"<html></html>";
Modified: trunk/rostests/winetests/mshtml/events.html
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/events.h…
==============================================================================
--- trunk/rostests/winetests/mshtml/events.html [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/events.html [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -5,6 +5,10 @@
function ok(b,m) {
return external.ok(b, m);
+}
+
+function broken(expr) {
+ return external.broken(expr);
}
function ondataavailable_test() {
@@ -114,8 +118,35 @@
ok(calls == "div2,div2*,div1,div1*,body,body*", "calls = " +
calls);
}
+function test_insert_script() {
+ var e = document.createElement("script");
+
+ extern_cnt = 0;
+ e.src = "externscr.js";
+
+ var readystatechange_log = "";
+ e.onreadystatechange = function() {
+ readystatechange_log += "," + e.readyState;
+ ok(extern_cnt === 1, "extern_cnt = " + extern_cnt);
+ if(e.readyState === "complete") {
+ ok(readystatechange_log === "append,complete",
"readystatechange_log = " + readystatechange_log);
+ external.reportSuccess();
+ }
+ }
+
+ document.body.appendChild(e);
+ ok(extern_cnt === 1, "extern_cnt = " + extern_cnt);
+ readystatechange_log = "append";
+}
+
window.onload = function() {
try {
+ ok(inlscr_complete_called, "onreadystatechange not fired");
+ ok(extern_res_script_rs === "eval,complete1,",
+ "extern_res_script_rs = " + extern_res_script_rs + " expected
eval,complete1,");
+ ok(extern_http_script_rs === "loading,loaded,complete,",
+ "extern_http_script_rs = " + extern_http_script_rs + "
expected loading,loaded,complete,");
+
ok(cnt == 1, "cnt=" + cnt + " exception during loading?");
ok(this === window, "this !== window");
@@ -127,11 +158,10 @@
test_scriptfor();
ondataavailable_test();
test_handler_this();
+ test_insert_script();
}catch(e) {
ok(false, "Got an exception: " + e.message);
}
-
- external.reportSuccess();
}
</script>
<script>
@@ -165,6 +195,48 @@
})();
</script>
<script>
+var inlscr_complete_called = false, extern_res_script_rs = "",
extern_http_script_rs = "";
+var extern_cnt = 0;
+
+function expect_inlscr_complete() {
+ var elem = document.getElementById("inlscr");
+ ok(elem.readyState === "complete" || broken(elem.readyState ===
"loading"), "expect_inlscr_complete: elem.readyState = " +
elem.readyState);
+ if(elem.readyState === "complete")
+ inlscr_complete_called = true;
+}
+
+function extern_res_script_readystatechange() {
+ var elem = document.getElementById("extscr");
+ if(elem.readyState != "loading")
+ extern_res_script_rs += elem.readyState + extern_cnt + ",";
+ else
+ external.trace("Got loading readyState from external res script.");
+}
+
+function http_script_readystatechange() {
+ var elem = document.getElementById("httpscr");
+ extern_http_script_rs += elem.readyState + ",";
+}
+
+function on_externscr() {
+ var elem = document.getElementById("extscr");
+ ok(elem.readyState === "interactive" || broken(elem.readyState ===
"loading"),
+ "on_externscr: elem.readyState = " + elem.readyState);
+ extern_res_script_rs += "eval,";
+}
+
+</script>
+<script id="inlscr"
onreadystatechange="expect_inlscr_complete();">
+(function() {
+ ok(inlscr_complete_called === false || broken(inlscr_complete_called),
"onreadystatechange fired too early");
+
+ var elem = document.getElementById("inlscr");
+ ok(elem.readyState === "interactive", "inlscr: elem.readyState =
" + elem.readyState);
+})();
+</script>
+<script id="extscr"
onreadystatechange="extern_res_script_readystatechange()"
src="externscr.js"></script>
+<script id="httpscr"
onreadystatechange="http_script_readystatechange()"
src="https://test.winehq.org/tests/empty.js?123456"></scrip…
+<script>
document.body.appendChild(img);
</script>
</body>
Modified: trunk/rostests/winetests/mshtml/externscr.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/externsc…
==============================================================================
--- trunk/rostests/winetests/mshtml/externscr.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/externscr.js [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -1 +1,3 @@
extern_cnt++;
+if("on_externscr" in window)
+ on_externscr();
Modified: trunk/rostests/winetests/mshtml/htmldoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/htmldoc.…
==============================================================================
--- trunk/rostests/winetests/mshtml/htmldoc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/htmldoc.c [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -2988,6 +2988,9 @@
case 144: /* TODO */
case 178:
case 179:
+ case 180:
+ case 181:
+ case 182:
return E_NOTIMPL;
default:
@@ -6289,7 +6292,7 @@
ok(hres == S_OK, "clear failed: %08x\n", hres);
}
-static const OLECMDF expect_cmds[OLECMDID_GETPRINTTEMPLATE+1] = {
+static const OLECMDF expect_cmds[] = {
0,
OLECMDF_SUPPORTED, /* OLECMDID_OPEN */
OLECMDF_SUPPORTED, /* OLECMDID_NEW */
@@ -6344,7 +6347,7 @@
return;
hres = IOleCommandTarget_QueryStatus(cmdtrg, cgid, 1, &olecmd, NULL);
- ok(hres == S_OK, "QueryStatus(%u) failed: %08x\n", cmdid, hres);
+ ok(hres == cmdf ? S_OK : OLECMDERR_E_NOTSUPPORTED, "QueryStatus(%u) failed:
%08x\n", cmdid, hres);
IOleCommandTarget_Release(cmdtrg);
@@ -6377,7 +6380,7 @@
static void test_OleCommandTarget(IHTMLDocument2 *doc)
{
IOleCommandTarget *cmdtrg;
- OLECMD cmds[OLECMDID_GETPRINTTEMPLATE];
+ OLECMD cmds[sizeof(expect_cmds)/sizeof(*expect_cmds)-1];
int i;
HRESULT hres;
@@ -6386,7 +6389,7 @@
if(FAILED(hres))
return;
- for(i=0; i<OLECMDID_GETPRINTTEMPLATE; i++) {
+ for(i=0; i < sizeof(cmds)/sizeof(*cmds); i++) {
cmds[i].cmdID = i+1;
cmds[i].cmdf = 0xf0f0;
}
@@ -6398,7 +6401,7 @@
CHECK_CALLED(QueryStatus_OPEN);
CHECK_CALLED(QueryStatus_NEW);
- for(i=0; i<OLECMDID_GETPRINTTEMPLATE; i++) {
+ for(i=0; i < sizeof(cmds)/sizeof(*cmds); i++) {
ok(cmds[i].cmdID == i+1, "cmds[%d].cmdID canged to %x\n", i,
cmds[i].cmdID);
if(i+1 == OLECMDID_FIND)
continue;
@@ -6619,6 +6622,31 @@
ok(hres == S_OK, "Exec failed: %08x\n", hres);
IOleCommandTarget_Release(cmdtrg);
+}
+
+static void test_exec_optical_zoom(IHTMLDocument2 *doc, int factor)
+{
+ IOleCommandTarget *cmdtrg;
+ VARIANT v;
+ HRESULT hres;
+
+ hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleCommandTarget,
(void**)&cmdtrg);
+ ok(hres == S_OK, "QueryInterface(IID_IOleCommandTarget) failed: %08x\n",
hres);
+ if(FAILED(hres))
+ return;
+
+ V_VT(&v) = VT_I4;
+ V_I4(&v) = factor;
+
+ SET_EXPECT(GetOverrideKeyPath);
+ hres = IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_OPTICAL_ZOOM,
+ OLECMDEXECOPT_DODEFAULT, &v, NULL);
+ ok(hres == S_OK || broken(hres == OLECMDERR_E_NOTSUPPORTED) /* IE6 */, "Exec
failed: %08x\n", hres);
+ CLEAR_CALLED(GetOverrideKeyPath);
+
+ IOleCommandTarget_Release(cmdtrg);
+
+ test_QueryStatus((IUnknown*)doc, NULL, OLECMDID_OPTICAL_ZOOM, 0);
}
static void test_IsDirty(IHTMLDocument2 *doc, HRESULT exhres)
@@ -7486,6 +7514,8 @@
test_MSHTML_QueryStatus(doc, OLECMDF_SUPPORTED);
test_OleCommandTarget_fail(doc);
test_OleCommandTarget(doc);
+ test_exec_optical_zoom(doc, 200);
+ test_exec_optical_zoom(doc, 100);
test_OnAmbientPropertyChange(doc);
test_Window(doc, TRUE);
test_external(doc, TRUE);
Modified: trunk/rostests/winetests/mshtml/jstest.html
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/jstest.h…
==============================================================================
--- trunk/rostests/winetests/mshtml/jstest.html [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/jstest.html [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -3,6 +3,10 @@
<script>
function ok(b,m) {
return external.ok(b, m);
+}
+
+function broken(expr) {
+ return external.broken(expr);
}
function test_removeAttribute(e) {
@@ -98,11 +102,13 @@
ok(cloned.style.filter === "alpha(opacity=50)", "cloned.style.filter =
" + cloned.style.filter);
}
-function test_setAttribute() {
- var input;
+function test_attrs() {
+ var input, s, x, f, b;
document.body.innerHTML = '<input
id="inputid"></input>';
input = document.getElementById("inputid");
+ s = input.style;
+ f = input.fireEvent;
ok(input.checked === false, "input.checked = " + input.checked);
input.setAttribute("checked", "test");
@@ -113,6 +119,116 @@
input.setAttribute("checked", "");
ok(input.checked === false, "input.checked = " + input.checked);
+
+ input.setAttribute("Checked", 1, 0);
+ ok(input.checked === true, "input.checked = " + input.checked);
+ ok(!("Checked" in input), "Checked added to input");
+
+ input.setAttribute("checked", 0, 0);
+ input.setAttribute("Checked", 1, 1);
+ ok(input.checked === false, "input.checked = " + input.checked);
+ ok("Checked" in input, "checked not added to input");
+ ok(input.Checked === 1, "input.Checked = " + input.Checked);
+
+ input.removeAttribute("Checked", 1);
+ ok(!("Checked" in input), "Checked is still in input");
+ ok(input.checked === false, "input.checked = " + input.checked);
+
+ input.setAttribute("checked", 1, 0);
+ input.setAttribute("Checked", 0);
+ ok(input.checked === true, "input.checked = " + input.checked);
+ ok("Checked" in input, "checked not added to input");
+ ok(input.Checked === 0, "input.Checked = " + input.Checked);
+
+ input.setAttribute("Checked", 2, 2);
+ ok(input.Checked === 0, "input.Checked = " + input.Checked);
+ input.setAttribute("Checked", 3, 3);
+ ok(input.Checked === 3, "input.Checked = " + input.Checked);
+
+ x = input.getAttribute("style");
+ ok(x === s, "getAttribute('style') = " + x);
+ ok(s.cssText === "", "s.cssText = " + s.cssText);
+ x = input.getAttribute("style", 2);
+ ok(x === "", "getAttribute('style') = " + x);
+
+ input.setAttribute("style", "display: none");
+ x = input.getAttribute("style");
+ ok(x === s, "getAttribute('style') = " + x);
+ ok(s.cssText === "", "s.cssText = " + s.cssText);
+ ok(s.display === "", "s.display = " + s.display);
+ x = input.getAttribute("style", 2);
+ ok(x === "", "getAttribute('style') = " + x);
+
+ s.display = "none";
+ ok(s.cssText != "", "s.cssText = " + s.cssText);
+ ok(s.display === "none", "s.display = " + s.display);
+ input.setAttribute("style", "");
+ x = input.getAttribute("style");
+ ok(x === s, "getAttribute('style') = " + x);
+ ok(s.cssText != "", "s.cssText = " + s.cssText);
+ ok(s.display === "none", "s.display = " + s.display);
+ x = input.getAttribute("style", 2);
+ ok(x === "", "getAttribute('style') = " + x);
+
+ input.setAttribute("style", null);
+ x = input.getAttribute("style");
+ ok(input.style === s, "input.style = " + input.style);
+ ok(x === s, "getAttribute('style') = " + x);
+ ok(s.cssText != "", "s.cssText = " + s.cssText);
+ ok(s.display === "none", "s.display = " + s.display);
+
+ x = input.getAttribute("fireEvent");
+ ok(x === input.fireEvent, "input.getAttribute('fireEvent') = " +
x);
+ x = input.getAttribute("fireEvent", 2);
+ ok(x === "", "getAttribute('fireEvent') = " + x);
+
+ input.setAttribute("fireEvent", 3);
+ ok(input.fireEvent === 3, "input.fireEvent = " + input.fireEvent);
+ x = input.getAttribute("fireEvent");
+ ok(x === 3, "input.getAttribute('fireEvent') = " + x);
+ x = input.getAttribute("fireEvent", 2);
+ ok(x === "3", "getAttribute('fireEvent') = " + x);
+
+ b = input.removeAttribute("style");
+ ok(b === true, "removeAttribute('style') failed");
+ ok(input.style === s, "input.style = " + input.style);
+ x = input.getAttribute("style");
+ ok(x === s, "getAttribute('style') = " + x);
+ ok(s.display === "", "s.display = " + s.display);
+ ok(s.cssText === "", "s.cssText = " + s.cssText);
+ x = input.getAttribute("style", 2);
+ ok(x === "", "getAttribute('style') = " + x);
+ b = input.removeAttribute("style");
+ ok(b === true, "removeAttribute('style') failed");
+
+ b = false;
+ try {
+ input.setAttribute("tagName", "xxx");
+ }catch(e) {
+ b = true;
+ }
+ ok(b, "Expected exception on setAttribute(tagName)");
+
+ b = false;
+ try {
+ input.setAttribute("parentElement", "xxx");
+ }catch(e) {
+ b = true;
+ }
+ ok(b, "Expected exception on setAttribute(parentElement)");
+
+ b = input.removeAttribute("fireEvent");
+ ok(b === true, "removeAttribute(fireEvent) failed");
+ ok(input.fireEvent === f, "input.fireEvent = " + input.fireEvent);
+ x = input.getAttribute("fireEvent");
+ ok(x === f, "input.getAttribute('fireEvent') = " + x);
+ b = input.removeAttribute("fireEvent");
+ ok(b === false || broken(b === true), "removeAttribute(fireEvent) returned
" + b);
+
+ input.fireEvent = 3;
+ x = input.getAttribute("fireEvent");
+ ok(x === 3, "input.getAttribute('fireEvent') = " + x);
+ ok(input.fireEvent === 3, "input.fireEvent' = " + input.fireEvent);
}
function test_attribute_collection() {
@@ -213,6 +329,29 @@
t = document.getElementById("tid");
ok(t.rows[0].cells[0].childNodes.length === 2,
"t.rows[0].cells[0].childNodes.length = " +
t.rows[0].cells[0].childNodes.length);
+}
+
+function test_language_attribute() {
+ document.body.innerHTML = '<div id="did"
language="test"></div>';
+ var elem = document.getElementById("did");
+ ok(elem.language === "test", "elem.language = " +
elem.language);
+ elem.language = 1;
+ ok(elem.language === "1", "elem.language = " + elem.language);
+}
+
+function test_text_node() {
+ document.body.innerHTML = 'testing text';
+ var text = document.body.childNodes[0], text2;
+ ok(text.data == "testing text", "text.data = " + text.data);
+
+ text2 = text.splitText(7);
+ ok(text.data == "testing", "text.data = " + text.data);
+ ok(text2.data == " text", "text2.data = " + text2.data);
+ ok(text.nextSibling === text2, "text.nextSibling !== text2");
+
+ text2 = text.splitText(0);
+ ok(text.data == "", "text.data = " + text.data);
+ ok(text2.data == "testing", "text2.data = " + text2.data);
}
var globalVar = false;
@@ -231,13 +370,15 @@
test_document_name_as_index();
test_remove_style_attribute();
test_getter_call();
- test_setAttribute();
+ test_attrs();
test_attribute_collection();
test_arg_conv();
test_override_functions();
test_forin();
test_customtag();
test_whitespace_nodes();
+ test_language_attribute();
+ test_text_node();
var r = window.execScript("globalVar = true;");
ok(r === undefined, "execScript returned " + r);
Modified: trunk/rostests/winetests/mshtml/nav_test.html
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/nav_test…
==============================================================================
--- trunk/rostests/winetests/mshtml/nav_test.html [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/nav_test.html [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -5,7 +5,7 @@
return external.ok(b, m);
}
-function nav_back_test() {
+function nav_parent_test() {
external.trace("Running _parent navigation tests...");
var iframe = document.getElementById("testframe");
@@ -29,12 +29,12 @@
}
function window_navigate_test() {
- external.trace("Runnint window.navigate() tests...");
+ external.trace("Running window.navigate() tests...");
var iframe = document.getElementById("testframe");
iframe.onload = function() {
- iframe.onlod = null;
+ iframe.onload = null;
var href = iframe.contentWindow.location.href;
ok(href === "about:blank", "Unexpected href " + href);
next_test();
@@ -43,9 +43,42 @@
iframe.contentWindow.navigate("about:blank");
}
+function window_open_self_test() {
+ external.trace("Running window.open(_self) tests...");
+
+ var iframe = document.getElementById("testframe");
+ var iframe_window = iframe.contentWindow;
+
+ iframe.onload = function() {
+ iframe.onload = null;
+ var href = iframe.contentWindow.location.href;
+ ok(/.*blank.html\?window_open_self/.test(href), "Unexpected href " +
href);
+ ok(iframe.contentWindow === iframe_window, "iframe.contentWindow !==
iframe_window");
+ next_test();
+ }
+
+ iframe_window.open("blank.html?window_open_self", "_self");
+}
+
+function detached_src_test() {
+ var iframe = document.createElement("iframe");
+ var onload_called = false;
+
+ iframe.onload = function() {
+ onload_called = true;
+ next_test();
+ }
+
+ iframe.src = "blank.html";
+ document.body.appendChild(iframe);
+ ok(onload_called === false, "called onload too early?");
+}
+
var tests = [
- nav_back_test,
+ nav_parent_test,
window_navigate_test,
+ window_open_self_test,
+ detached_src_test,
function() { external.reportSuccess(); }
];
Modified: trunk/rostests/winetests/mshtml/protocol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/protocol…
==============================================================================
--- trunk/rostests/winetests/mshtml/protocol.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/protocol.c [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -137,13 +137,16 @@
{
CHECK_EXPECT(ReportResult);
- if(expect_hr_win32err)
+ if(expect_hr_win32err) {
ok((hrResult&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) ||
expect_hrResult,
"expected win32 err or %08x got: %08x\n", expect_hrResult,
hrResult);
- else
- ok(hrResult == expect_hrResult || ((expect_hrResult == E_INVALIDARG ||
- expect_hrResult == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND))
&&
- hrResult == MK_E_SYNTAX), "expected: %08x got: %08x\n",
expect_hrResult, hrResult);
+ }else {
+ ok(hrResult == expect_hrResult || (expect_hrResult == E_INVALIDARG &&
hrResult == MK_E_SYNTAX)
+ || (expect_hrResult == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND)
&&
+ (hrResult == MK_E_SYNTAX || hrResult ==
HRESULT_FROM_WIN32(ERROR_DLL_NOT_FOUND))),
+ "expected: %08x got: %08x\n", expect_hrResult, hrResult);
+ expect_hrResult = hrResult;
+ }
ok(dwError == 0, "dwError = %d\n", dwError);
ok(!szResult, "szResult != NULL\n");
@@ -232,9 +235,7 @@
ok((hres&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hres ==
expect_hrResult,
"expected win32 err or %08x got: %08x\n", expected_hres,
hres);
else
- ok(hres == expected_hres || ((expected_hres == E_INVALIDARG ||
- expected_hres == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND)) &&
hres == MK_E_SYNTAX),
- "expected: %08x got: %08x\n", expected_hres, hres);
+ ok(hres == expect_hrResult, "expected: %08x got: %08x\n",
expect_hrResult, hres);
CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult);
@@ -601,6 +602,16 @@
test_res_url("/jstest.html");
test_res_url("/Test/res.html");
test_res_url("/test/dir/dir2/res.html");
+
+ if(GetProcAddress(LoadLibraryA("urlmon.dll"), "CreateUri")) {
+ test_res_url("/test/dir/dir2/res.html?query_part");
+ test_res_url("/test/dir/dir2/res.html#hash_part");
+ test_res_url("/#123");
+ test_res_url("/#23/#123");
+ test_res_url("/#123#456");
+ }else {
+ win_skip("IUri not supported\n");
+ }
}
static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
Modified: trunk/rostests/winetests/mshtml/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/rsrc.rc?…
==============================================================================
--- trunk/rostests/winetests/mshtml/rsrc.rc [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/rsrc.rc [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -40,6 +40,9 @@
/* @makedep: blank.html */
blank2.html HTML "blank.html"
+/* @makedep: blank.html */
+123 HTML "blank.html"
+
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
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] Sat Mar 28 15:53:45 2015
@@ -146,6 +146,7 @@
#define DISPID_EXTERNAL_TRACE 0x300001
#define DISPID_EXTERNAL_REPORTSUCCESS 0x300002
#define DISPID_EXTERNAL_TODO_WINE_OK 0x300003
+#define DISPID_EXTERNAL_BROKEN 0x300004
static const GUID CLSID_TestScript =
{0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x07,0x46}};
@@ -594,6 +595,10 @@
*pid = DISPID_EXTERNAL_TODO_WINE_OK;
return S_OK;
}
+ if(!strcmp_wa(bstrName, "broken")) {
+ *pid = DISPID_EXTERNAL_BROKEN;
+ return S_OK;
+ }
ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName));
return DISP_E_UNKNOWNNAME;
@@ -671,6 +676,20 @@
todo_wine
ok(V_BOOL(pdp->rgvarg+1), "%s\n",
wine_dbgstr_w(V_BSTR(pdp->rgvarg)));
+ return S_OK;
+
+ case DISPID_EXTERNAL_BROKEN:
+ ok(wFlags == INVOKE_FUNC || wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET),
"wFlags = %x\n", wFlags);
+ ok(pdp != NULL, "pdp == NULL\n");
+ ok(pdp->rgvarg != NULL, "rgvarg == NULL\n");
+ ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n");
+ ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
+ ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs);
+ ok(pei != NULL, "pei == NULL\n");
+
+ ok(V_VT(pdp->rgvarg) == VT_BOOL, "V_VT(psp->rgvargs) = %d\n",
V_VT(pdp->rgvarg));
+ V_VT(pvarRes) = VT_BOOL;
+ V_BOOL(pvarRes) = broken(V_BOOL(pdp->rgvarg)) ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
default:
@@ -1915,7 +1934,7 @@
V_VT(&var) = VT_I4;
V_I4(&var) = 100;
hres = dispex_propput(obj, id, 0, &var, NULL);
- ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres);
+ todo_wine ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres);
hres = dispex_propget(dispex, DISPID_VALUE, &var, NULL);
ok(hres == E_ACCESSDENIED, "InvokeEx returned: %08x, expected
E_ACCESSDENIED\n", hres);
Modified: trunk/rostests/winetests/mshtml/style.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/style.c?…
==============================================================================
--- trunk/rostests/winetests/mshtml/style.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/style.c [iso-8859-1] Sat Mar 28 15:53:45 2015
@@ -453,6 +453,7 @@
static void test_style3(IHTMLStyle3 *style3)
{
+ VARIANT v;
BSTR str;
HRESULT hres;
@@ -471,6 +472,37 @@
ok(hres == S_OK, "get_wordWrap failed: %08x\n", hres);
ok(!strcmp_wa(str, "break-word"), "get_wordWrap returned %s\n",
wine_dbgstr_w(str));
SysFreeString(str);
+
+ V_VT(&v) = VT_ERROR;
+ hres = IHTMLStyle3_get_zoom(style3, &v);
+ ok(hres == S_OK, "get_zoom failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(zoom) = %d\n", V_VT(&v));
+ ok(!V_BSTR(&v), "V_BSTR(zoom) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("100%");
+ hres = IHTMLStyle3_put_zoom(style3, v);
+ ok(hres == S_OK, "put_zoom failed: %08x\n", hres);
+
+ V_VT(&v) = VT_ERROR;
+ hres = IHTMLStyle3_get_zoom(style3, &v);
+ ok(hres == S_OK, "get_zoom failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(zoom) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "100%"), "V_BSTR(zoom) = %s\n",
wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ V_VT(&v) = VT_I4;
+ V_I4(&v) = 1;
+ hres = IHTMLStyle3_put_zoom(style3, v);
+ ok(hres == S_OK, "put_zoom failed: %08x\n", hres);
+
+ V_VT(&v) = VT_ERROR;
+ hres = IHTMLStyle3_get_zoom(style3, &v);
+ ok(hres == S_OK, "get_zoom failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(zoom) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "1"), "V_BSTR(zoom) = %s\n",
wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
}
static void test_style4(IHTMLStyle4 *style4)
@@ -547,6 +579,82 @@
hres = IHTMLStyle5_put_minWidth(style5, vdefault);
ok(hres == S_OK, "put_minWidth failed: %08x\n", hres);
+ VariantClear(&vdefault);
+
+ /* maxWidth */
+ hres = IHTMLStyle5_get_maxWidth(style5, &vdefault);
+ ok(hres == S_OK, "get_maxWidth failed: %08x\n", hres);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("200px");
+ hres = IHTMLStyle5_put_maxWidth(style5, v);
+ ok(hres == S_OK, "put_maxWidth failed: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_get_maxWidth(style5, &v);
+ ok(hres == S_OK, "get_maxWidth failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n",V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "200px"), "expect 200px got
(%s)\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("70%");
+ hres = IHTMLStyle5_put_maxWidth(style5, v);
+ ok(hres == S_OK, "put_maxWidth failed: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_get_maxWidth(style5, &v);
+ ok(hres == S_OK, "get maxWidth failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "70%"), "expect 70%% got (%s)\n",
wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_put_maxWidth(style5,vdefault);
+ ok(hres == S_OK, "put_maxWidth failed: %08x\n", hres);
+ VariantClear(&vdefault);
+
+ /* maxHeight */
+ hres = IHTMLStyle5_get_maxHeight(style5, &vdefault);
+ ok(hres == S_OK, "get maxHeight failed: %08x\n", hres);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("200px");
+ hres = IHTMLStyle5_put_maxHeight(style5, v);
+ ok(hres == S_OK, "put maxHeight failed: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_get_maxHeight(style5, &v);
+ ok(hres == S_OK, "get maxHeight failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "200px"), "expect 200px got
(%s)\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("70%");
+ hres = IHTMLStyle5_put_maxHeight(style5, v);
+ ok(hres == S_OK, "put maxHeight failed: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_get_maxHeight(style5, &v);
+ ok(hres == S_OK, "get_maxHeight failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "70%"), "expect 70%% got (%s)\n",
wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("100");
+ hres = IHTMLStyle5_put_maxHeight(style5, v);
+ ok(hres == S_OK, "put maxHeight failed: %08x\n", hres);
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_get_maxHeight(style5, &v);
+ ok(hres == S_OK, "get_maxHeight failed: %08x\n", hres);
+ ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
+ ok(!strcmp_wa(V_BSTR(&v), "100px"), "expect 100 got (%s)\n",
wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+
+ hres = IHTMLStyle5_put_maxHeight(style5, vdefault);
+ ok(hres == S_OK, "put maxHeight failed:%08x\n", hres);
VariantClear(&vdefault);
}
@@ -747,6 +855,16 @@
ok(!strcmp_wa(str, "900"), "str != style900\n");
SysFreeString(str);
+ str = a2bstr("");
+ 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(!str, "str != NULL\n");
+ SysFreeString(str);
+
hres = IHTMLStyle_put_fontWeight(style, sDefault);
ok(hres == S_OK, "put_fontWeight failed: %08x\n", hres);
SysFreeString(sDefault);
@@ -2360,6 +2478,21 @@
win_skip("IHTMLStyle_put_listStyle already failed\n");
}
+ str = (void*)0xdeadbeef;
+ hres = IHTMLStyle_get_styleFloat(style, &str);
+ ok(hres == S_OK, "get_styleFloat failed: %08x\n", hres);
+ ok(!str, "styleFloat = %s\n", wine_dbgstr_w(str));
+
+ str = a2bstr("left");
+ hres = IHTMLStyle_put_styleFloat(style, str);
+ ok(hres == S_OK, "put_styleFloat failed: %08x\n", hres);
+ SysFreeString(str);
+
+ str = NULL;
+ hres = IHTMLStyle_get_styleFloat(style, &str);
+ ok(hres == S_OK, "get_styleFloat failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "left"), "styleFloat = %s\n",
wine_dbgstr_w(str));
+
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) {