Author: akhaldi
Date: Mon Oct 7 14:23:51 2013
New Revision: 60579
URL:
http://svn.reactos.org/svn/reactos?rev=60579&view=rev
Log:
[MSHTML_WINETEST]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/rostests/winetests/mshtml/CMakeLists.txt
trunk/rostests/winetests/mshtml/dom.c
trunk/rostests/winetests/mshtml/htmldoc.c
trunk/rostests/winetests/mshtml/jstest.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
trunk/rostests/winetests/mshtml/testlist.c
Modified: trunk/rostests/winetests/mshtml/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/CMakeLis…
==============================================================================
--- trunk/rostests/winetests/mshtml/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/CMakeLists.txt [iso-8859-1] Mon Oct 7 14:23:51 2013
@@ -1,5 +1,3 @@
-
-add_definitions(-D__ROS_LONG64__)
add_idl_Headers(test_tlb_header test_tlb.idl)
add_typelib(test_tlb.idl)
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] Mon Oct 7 14:23:51 2013
@@ -781,6 +781,17 @@
return node;
}
+#define get_htmldoc5_iface(u) _get_htmldoc5_iface(__LINE__,u)
+static IHTMLDocument5 *_get_htmldoc5_iface(unsigned line, IUnknown *unk)
+{
+ IHTMLDocument5 *doc;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument5, (void**)&doc);
+ ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument5: %08x\n",
hres);
+ return doc;
+}
+
#define get_img_iface(u) _get_img_iface(__LINE__,u)
static IHTMLImgElement *_get_img_iface(unsigned line, IUnknown *unk)
{
@@ -910,6 +921,28 @@
hres = IUnknown_QueryInterface(unk, &IID_IHTMLIFrameElement2, (void**)&ret);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLIFrameElement:
%08x\n", hres);
+ return ret;
+}
+
+#define get_button_iface(u) _get_button_iface(__LINE__,u)
+static IHTMLButtonElement *_get_button_iface(unsigned line, IUnknown *unk)
+{
+ IHTMLButtonElement *ret;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLButtonElement, (void**)&ret);
+ ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLButtonElement:
%08x\n", hres);
+ return ret;
+}
+
+#define get_label_iface(u) _get_label_iface(__LINE__,u)
+static IHTMLLabelElement *_get_label_iface(unsigned line, IUnknown *unk)
+{
+ IHTMLLabelElement *ret;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLLabelElement, (void**)&ret);
+ ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLLabelElement:
%08x\n", hres);
return ret;
}
@@ -1330,6 +1363,35 @@
_test_disp_value(line, unk, exhref);
}
+#define test_anchor_rel(a,h) _test_anchor_rel(__LINE__,a,h)
+static void _test_anchor_rel(unsigned line, IUnknown *unk, const char *exrel)
+{
+ IHTMLAnchorElement *anchor = _get_anchor_iface(line, unk);
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLAnchorElement_get_rel(anchor, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_rel failed: %08x\n", hres);
+ if(exrel)
+ ok_(__FILE__,line)(!strcmp_wa(str, exrel), "rel = %s, expected %s\n",
wine_dbgstr_w(str), exrel);
+ else
+ ok_(__FILE__,line)(!str, "rel = %s, expected NULL\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+}
+
+#define test_anchor_put_rel(a,h) _test_anchor_put_rel(__LINE__,a,h)
+static void _test_anchor_put_rel(unsigned line, IUnknown *unk, const char *exrel)
+{
+ IHTMLAnchorElement *anchor = _get_anchor_iface(line, unk);
+ BSTR str;
+ HRESULT hres;
+
+ str = a2bstr(exrel);
+ hres = IHTMLAnchorElement_put_rel(anchor, str);
+ ok_(__FILE__,line)(hres == S_OK, "get_rel failed: %08x\n", hres);
+ SysFreeString(str);
+}
+
#define test_anchor_get_target(a,h) _test_anchor_get_target(__LINE__,a,h)
static void _test_anchor_get_target(unsigned line, IUnknown *unk, const char *target)
{
@@ -1403,6 +1465,22 @@
ok_(__FILE__,line)(!strcmp_wa(str, hostname), "hostname = %s, expected
%s\n", wine_dbgstr_w(str), hostname);
else
ok_(__FILE__,line)(str == NULL, "hostname = %s, expected NULL\n",
wine_dbgstr_w(str));
+ 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)
+{
+ IHTMLAnchorElement *anchor = _get_anchor_iface(line, (IUnknown*)elem);
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLAnchorElement_get_hash(anchor, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_hash failed: %08x\n", hres);
+ if(exhash)
+ ok_(__FILE__,line)(!strcmp_wa(str, exhash), "hash = %s, expected %s\n",
wine_dbgstr_w(str), exhash);
+ else
+ ok_(__FILE__,line)(!str, "hash = %s, expected NULL\n",
wine_dbgstr_w(str));
SysFreeString(str);
}
@@ -2013,8 +2091,6 @@
VARIANT name, index;
IDispatch *disp, *disp2;
HRESULT hres;
-
- ok(1,"[_test_elem_collection]\n");
hres = IUnknown_QueryInterface(unk, &IID_IHTMLElementCollection,
(void**)&col);
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElementCollection:
%08x\n", hres);
@@ -2410,6 +2486,33 @@
ok_(__FILE__,line)(hres == S_OK, "get_length failed: %08x\n", hres);
ok_(__FILE__,line)(length == l, "length = %d, expected %d\n", length, l);
IHTMLDOMTextNode_Release(text);
+}
+
+#define test_text_data(a,b) _test_text_data(__LINE__,a,b)
+static void _test_text_data(unsigned line, IUnknown *unk, const char *exdata)
+{
+ IHTMLDOMTextNode *text = _get_text_iface(line, unk);
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLDOMTextNode_get_data(text, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_data failed: %08x\n", hres);
+ ok_(__FILE__,line)(!strcmp_wa(str, exdata), "data = %s, expected %s\n",
wine_dbgstr_w(str), exdata);
+ IHTMLDOMTextNode_Release(text);
+ SysFreeString(str);
+}
+
+#define set_text_data(a,b) _set_text_data(__LINE__,a,b)
+static void _set_text_data(unsigned line, IUnknown *unk, const char *data)
+{
+ IHTMLDOMTextNode *text = _get_text_iface(line, unk);
+ BSTR str = a2bstr(data);
+ HRESULT hres;
+
+ hres = IHTMLDOMTextNode_put_data(text, str);
+ ok_(__FILE__,line)(hres == S_OK, "get_data failed: %08x\n", hres);
+ IHTMLDOMTextNode_Release(text);
+ SysFreeString(str);
}
#define test_select_set_disabled(i,b) _test_select_set_disabled(__LINE__,i,b)
@@ -4469,22 +4572,18 @@
IHTMLTxtRange_Release(range);
}
-static void test_compatmode(IHTMLDocument2 *doc)
-{
- IHTMLDocument5 *doc5;
- BSTR mode;
- HRESULT hres;
-
- hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5,
(void**)&doc5);
- ok(hres == S_OK, "Could not get IHTMLDocument5 interface: %08x\n", hres);
- if(FAILED(hres))
- return;
-
- hres = IHTMLDocument5_get_compatMode(doc5, &mode);
- IHTMLDocument5_Release(doc5);
- ok(hres == S_OK, "get_compatMode failed: %08x\n", hres);
- ok(!strcmp_wa(mode, "BackCompat"), "compatMode=%s\n",
wine_dbgstr_w(mode));
- SysFreeString(mode);
+#define test_compatmode(a,b) _test_compatmode(__LINE__,a,b)
+static void _test_compatmode(unsigned line, IHTMLDocument2 *doc2, const char *excompat)
+{
+ IHTMLDocument5 *doc = get_htmldoc5_iface((IUnknown*)doc2);
+ BSTR str;
+ HRESULT hres;
+
+ hres = IHTMLDocument5_get_compatMode(doc, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_compatMode failed: %08x\n", hres);
+ ok_(__FILE__,line)(!strcmp_wa(str, excompat), "compatMode = %s, expected
%s\n", wine_dbgstr_w(str), excompat);
+
+ IHTMLDocument5_Release(doc);
}
static void test_location(IHTMLDocument2 *doc)
@@ -5304,7 +5403,7 @@
SysFreeString(str);
test_window(doc);
- test_compatmode(doc);
+ test_compatmode(doc, "BackCompat");
test_location(doc);
test_navigator(doc);
test_plugins_col(doc);
@@ -5350,6 +5449,73 @@
test_doc_title(doc, "");
}
+#define test_button_name(a,b) _test_button_name(__LINE__,a,b)
+static void _test_button_name(unsigned line, IHTMLElement *elem, const char *exname)
+{
+ IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem);
+ BSTR str;
+ HRESULT hres;
+
+ str = (void*)0xdeadbeef;
+ hres = IHTMLButtonElement_get_name(button, &str);
+ ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08x\n", hres);
+ if(exname)
+ ok_(__FILE__,line)(!strcmp_wa(str, exname), "name = %s, expected %s\n",
wine_dbgstr_w(str), exname);
+ else
+ ok_(__FILE__,line)(!str, "name = %s, expected NULL\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+ IHTMLButtonElement_Release(button);
+}
+
+#define set_button_name(a,b) _set_button_name(__LINE__,a,b)
+static void _set_button_name(unsigned line, IHTMLElement *elem, const char *name)
+{
+ IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem);
+ BSTR str = a2bstr(name);
+ HRESULT hres;
+
+ hres = IHTMLButtonElement_put_name(button, str);
+ ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08x\n", hres);
+ SysFreeString(str);
+ IHTMLButtonElement_Release(button);
+
+ _test_button_name(line, elem, name);
+}
+
+#define test_button_get_disabled(i,b) _test_button_get_disabled(__LINE__,i,b)
+static void _test_button_get_disabled(unsigned line, IHTMLElement *elem, VARIANT_BOOL
exb)
+{
+ IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem);
+ VARIANT_BOOL disabled = 100;
+ HRESULT hres;
+
+ hres = IHTMLButtonElement_get_disabled(button, &disabled);
+ ok_(__FILE__,line) (hres == S_OK, "get_disabled failed: %08x\n", hres);
+ ok_(__FILE__,line) (disabled == exb, "disabled=%x, expected %x\n",
disabled, exb);
+ IHTMLButtonElement_Release(button);
+
+ _test_elem3_get_disabled(line, (IUnknown*)elem, exb);
+}
+
+#define test_button_set_disabled(i,b) _test_button_set_disabled(__LINE__,i,b)
+static void _test_button_set_disabled(unsigned line, IHTMLElement *elem, VARIANT_BOOL b)
+{
+ IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem);
+ HRESULT hres;
+
+ hres = IHTMLButtonElement_put_disabled(button, b);
+ ok_(__FILE__,line) (hres == S_OK, "put_disabled failed: %08x\n", hres);
+ IHTMLButtonElement_Release(button);
+
+ _test_button_get_disabled(line, elem, b);
+}
+
+static void test_button_elem(IHTMLElement *elem)
+{
+ test_button_name(elem, NULL);
+ set_button_name(elem, "button name");
+}
+
static void test_tr_elem(IHTMLElement *elem)
{
IHTMLElementCollection *col;
@@ -5374,15 +5540,72 @@
IHTMLTableRow_Release(row);
}
+static void test_label_elem(IHTMLElement *elem)
+{
+ IHTMLLabelElement *label;
+ BSTR str;
+ HRESULT hres;
+
+ label = get_label_iface((IUnknown*)elem);
+
+ str = NULL;
+ hres = IHTMLLabelElement_get_htmlFor(label, &str);
+ ok(hres == S_OK, "get_htmlFor failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "in"), "htmlFor = %s\n", wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ str = a2bstr("");
+ hres = IHTMLLabelElement_put_htmlFor(label, str);
+ ok(hres == S_OK, "put_htmlFor failed: %08x\n", hres);
+ SysFreeString(str);
+
+ str = (void*)0xdeadbeef;
+ hres = IHTMLLabelElement_get_htmlFor(label, &str);
+ ok(hres == S_OK, "get_htmlFor failed: %08x\n", hres);
+ ok(!strcmp_wa(str, ""), "htmlFor = %s\n", wine_dbgstr_w(str));
+
+ str = a2bstr("abc");
+ hres = IHTMLLabelElement_put_htmlFor(label, str);
+ ok(hres == S_OK, "put_htmlFor failed: %08x\n", hres);
+ SysFreeString(str);
+
+ str = NULL;
+ hres = IHTMLLabelElement_get_htmlFor(label, &str);
+ ok(hres == S_OK, "get_htmlFor failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "abc"), "htmlFor = %s\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ IHTMLLabelElement_Release(label);
+}
+
+#define test_table_cell_spacing(a,b) _test_table_cell_spacing(__LINE__,a,b)
+static void _test_table_cell_spacing(unsigned line, IHTMLTable *table, const char
*exstr)
+{
+ VARIANT v;
+ HRESULT hres;
+
+ V_VT(&v) = VT_ERROR;
+ hres = IHTMLTable_get_cellSpacing(table, &v);
+ ok_(__FILE__,line)(hres == S_OK, "get_cellSpacing 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), "cellSpacing = %s,
expected %s\n", wine_dbgstr_w(V_BSTR(&v)), exstr);
+ else
+ ok_(__FILE__,line)(!V_BSTR(&v), "cellSpacing = %s, expected
NULL\n", wine_dbgstr_w(V_BSTR(&v)));
+ VariantClear(&v);
+}
+
static void test_table_elem(IHTMLElement *elem)
{
IHTMLElementCollection *col;
IHTMLTable *table;
IHTMLDOMNode *node;
+ VARIANT v;
HRESULT hres;
static const elem_type_t row_types[] = {ET_TR,ET_TR};
static const elem_type_t all_types[] = {ET_TBODY,ET_TR,ET_TR,ET_TD,ET_TD};
+ static const elem_type_t tbodies_types[] = {ET_TBODY};
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLTable, (void**)&table);
ok(hres == S_OK, "Could not get IHTMLTable iface: %08x\n", hres);
@@ -5392,7 +5615,7 @@
col = NULL;
hres = IHTMLTable_get_rows(table, &col);
ok(hres == S_OK, "get_rows failed: %08x\n", hres);
- ok(col != NULL, "get_ros returned NULL\n");
+ ok(col != NULL, "get_rows returned NULL\n");
test_elem_collection((IUnknown*)col, row_types,
sizeof(row_types)/sizeof(*row_types));
IHTMLElementCollection_Release(col);
@@ -5408,6 +5631,29 @@
test_elem_tag((IUnknown*)node, "TABLE");
test_elem_all((IUnknown*)node, NULL, 0);
IHTMLDOMNode_Release(node);
+
+ col = NULL;
+ hres = IHTMLTable_get_tBodies(table, &col);
+ ok(hres == S_OK, "get_tBodies failed: %08x\n", hres);
+ ok(col != NULL, "get_tBodies returned NULL\n");
+
+ test_elem_collection((IUnknown*)col, tbodies_types,
sizeof(tbodies_types)/sizeof(*tbodies_types));
+ IHTMLElementCollection_Release(col);
+
+ test_table_cell_spacing(table, NULL);
+
+ V_VT(&v) = VT_I4;
+ V_I4(&v) = 10;
+ hres = IHTMLTable_put_cellSpacing(table, v);
+ ok(hres == S_OK, "put_cellSpacing = %08x\n", hres);
+ test_table_cell_spacing(table, "10");
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = a2bstr("11");
+ hres = IHTMLTable_put_cellSpacing(table, v);
+ ok(hres == S_OK, "put_cellSpacing = %08x\n", hres);
+ test_table_cell_spacing(table, "11");
+ VariantClear(&v);
IHTMLTable_Release(table);
}
@@ -5657,6 +5903,8 @@
IHTMLStyleSheetRulesCollection *col = NULL;
IHTMLStyleSheet *stylesheet;
HRESULT hres;
+
+ test_disp2((IUnknown*)disp, &DIID_DispHTMLStyleSheet, &IID_IHTMLStyleSheet,
"[object]");
hres = IDispatch_QueryInterface(disp, &IID_IHTMLStyleSheet,
(void**)&stylesheet);
ok(hres == S_OK, "Could not get IHTMLStyleSheet: %08x\n", hres);
@@ -5843,6 +6091,14 @@
IHTMLElementCollection_Release(collection);
}
+ hres = IHTMLDocument2_get_scripts(doc, &collection);
+ ok(hres == S_OK, "get_scripts failed: %08x\n", hres);
+ if(hres == S_OK) {
+ static const elem_type_t script_types[] = {ET_SCRIPT};
+ test_elem_collection((IUnknown*)collection, script_types, 1);
+ IHTMLElementCollection_Release(collection);
+ }
+
test_plugins_col(doc);
elem = get_doc_elem(doc);
@@ -6085,6 +6341,13 @@
IHTMLElement_Release(elem);
}
+ elem = get_doc_elem_by_id(doc, "labelid");
+ ok(elem != NULL, "elem == NULL\n");
+ if(elem) {
+ test_label_elem(elem);
+ IHTMLElement_Release(elem);
+ }
+
elem = get_doc_elem_by_id(doc, "row2");
ok(elem != NULL, "elem == NULL\n");
if(elem) {
@@ -6096,6 +6359,17 @@
ok(elem != NULL, "elem == NULL\n");
if(elem) {
test_iframe_elem(elem);
+ IHTMLElement_Release(elem);
+ }
+
+ elem = get_doc_elem_by_id(doc, "btnid");
+ ok(elem != NULL, "elem == NULL\n");
+ if(elem) {
+ test_button_elem(elem);
+ test_button_get_disabled(elem, VARIANT_FALSE);
+ test_button_set_disabled(elem, VARIANT_TRUE);
+ test_elem3_set_disabled((IUnknown*)elem, VARIANT_FALSE);
+ test_button_get_disabled(elem, VARIANT_FALSE);
IHTMLElement_Release(elem);
}
@@ -6122,9 +6396,14 @@
test_anchor_put_href((IUnknown*)elem, "http://test/");
test_anchor_href((IUnknown*)elem, "http://test/");
test_anchor_hostname((IUnknown*)elem, "test");
+ test_anchor_hash(elem, NULL);
/* target */
test_anchor_get_target((IUnknown*)elem, NULL);
+
+ test_anchor_rel((IUnknown*)elem, NULL);
+ test_anchor_put_rel((IUnknown*)elem, "Next");
+ test_anchor_rel((IUnknown*)elem, "Next");
/* Change the target */
test_anchor_put_target((IUnknown*)elem, "wine");
@@ -6138,6 +6417,9 @@
test_anchor_put_name((IUnknown*)elem, "anchor name");
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_hash(elem, "#hash");
IHTMLElement_Release(elem);
}
@@ -6537,10 +6819,13 @@
IHTMLElement_Release(elem);
IHTMLDOMNode_Release(node);
- node = test_create_text(doc, "test");
+ node = test_create_text(doc, "abc");
test_ifaces((IUnknown*)node, text_iids);
test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode, "[object]");
- test_text_length((IUnknown*)node, 4);
+ test_text_length((IUnknown*)node, 3);
+ test_text_data((IUnknown*)node, "abc");
+ set_text_data((IUnknown*)node, "test");
+ test_text_data((IUnknown*)node, "test");
V_VT(&var) = VT_NULL;
node2 = test_node_insertbefore((IUnknown*)body, node, &var);
@@ -6565,9 +6850,8 @@
test_elem_innertext(body, "insert test Test");
IHTMLDOMNode_Release(node);
- hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5,
(void**)&doc5);
- if(hres == S_OK)
- {
+ doc5 = get_htmldoc5_iface((IUnknown*)doc);
+ if(doc5) {
str = a2bstr("testing");
hres = IHTMLDocument5_createComment(doc5, str, &comment);
SysFreeString(str);
@@ -6834,12 +7118,37 @@
IHTMLElementCollection_Release(col);
}
+static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
+{
+ ok(IsEqualGUID(riid, &IID_IServiceProvider), "riid = %s\n",
dbgstr_guid(riid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI Unknown_AddRef(IUnknown *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI Unknown_Release(IUnknown *iface)
+{
+ return 1;
+}
+
+static const IUnknownVtbl UnknownVtbl = {
+ Unknown_QueryInterface,
+ Unknown_AddRef,
+ Unknown_Release,
+};
+static IUnknown obj_ident_test = { &UnknownVtbl };
+
static void test_frame(IDispatch *disp, const char *exp_id)
{
IHTMLWindow2 *frame2, *parent, *top;
IHTMLDocument2 *parent_doc, *top_doc;
IHTMLWindow4 *frame;
IHTMLFrameBase *frame_elem;
+ IObjectIdentity *obj_ident;
+ ITravelLogClient *tlc;
HRESULT hres;
hres = IDispatch_QueryInterface(disp, &IID_IHTMLWindow4, (void**)&frame);
@@ -6869,6 +7178,29 @@
IHTMLWindow2_Release(frame2);
return;
}
+
+ hres = IHTMLWindow2_QueryInterface(frame2, &IID_IObjectIdentity,
(void**)&obj_ident);
+ ok(hres == S_OK, "Could not get IObjectIdentity interface: %08x\n", hres);
+ hres = IHTMLWindow2_QueryInterface(frame2, &IID_ITravelLogClient,
(void**)&tlc);
+ if(hres == E_NOINTERFACE) {
+ win_skip("IID_ITravelLogClient not available\n");
+ tlc = NULL;
+ }else {
+ ok(hres == S_OK, "Could not get ITravelLogClient interface: %08x\n",
hres);
+
+ hres = IObjectIdentity_IsEqualObject(obj_ident, (IUnknown*)tlc);
+ ok(hres == S_OK, "IsEqualObject returned: 0x%08x\n", hres);
+ ITravelLogClient_Release(tlc);
+ }
+
+ hres = IObjectIdentity_IsEqualObject(obj_ident, (IUnknown*)obj_ident);
+ ok(hres == S_OK, "IsEqualObject returned: 0x%08x\n", hres);
+ hres = IObjectIdentity_IsEqualObject(obj_ident, (IUnknown*)parent);
+ ok(hres == S_FALSE, "IsEqualObject returned: 0x%08x\n", hres);
+ hres = IObjectIdentity_IsEqualObject(obj_ident, &obj_ident_test);
+ ok(hres == E_NOINTERFACE, "IsEqualObject returned: 0x%08x\n", hres);
+
+ IObjectIdentity_Release(obj_ident);
hres = IHTMLWindow2_get_document(parent, &parent_doc);
ok(hres == S_OK, "IHTMLWindow2_get_document failed: 0x%08x\n", hres);
@@ -7081,6 +7413,16 @@
IHTMLDocument2_Release(frag);
}
+static void check_quirks_mode(IHTMLDocument2 *doc)
+{
+ test_compatmode(doc, "BackCompat");
+}
+
+static void check_strict_mode(IHTMLDocument2 *doc)
+{
+ test_compatmode(doc, "CSS1Compat");
+}
+
static IHTMLDocument2 *notif_doc;
static BOOL doc_complete;
@@ -7210,6 +7552,13 @@
ref = IHTMLDocument2_Release(doc);
ok(!ref || broken(ref == 1), /* Vista */
"ref = %d\n", ref);
+}
+
+static void test_quirks_mode(void)
+{
+ run_domtest("<html></html>", check_quirks_mode);
+ run_domtest("<!DOCTYPE html>\n<html></html>",
check_strict_mode);
+ run_domtest("<!-- comment --><!DOCTYPE
html>\n<html></html>", check_quirks_mode);
}
START_TEST(dom)
@@ -7242,5 +7591,7 @@
run_domtest(doc_blank, test_replacechild_elems);
run_domtest(doctype_str, test_doctype);
+ test_quirks_mode();
+
CoUninitialize();
}
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] Mon Oct 7 14:23:51 2013
@@ -43,6 +43,7 @@
//#include "shobjidl.h"
#include <htiface.h>
#include <tlogstg.h>
+#include <exdispid.h>
#include "mshtml_test.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
@@ -156,6 +157,7 @@
DEFINE_EXPECT(OnChanged_READYSTATE);
DEFINE_EXPECT(OnChanged_1005);
DEFINE_EXPECT(OnChanged_1012);
+DEFINE_EXPECT(OnChanged_1014);
DEFINE_EXPECT(GetDisplayName);
DEFINE_EXPECT(BindToStorage);
DEFINE_EXPECT(IsSystemMoniker);
@@ -194,6 +196,10 @@
DEFINE_EXPECT(IsErrorUrl);
DEFINE_EXPECT(get_LocationURL);
DEFINE_EXPECT(CountEntries);
+DEFINE_EXPECT(FindConnectionPoint);
+DEFINE_EXPECT(EnumConnections);
+DEFINE_EXPECT(EnumConnections_Next);
+DEFINE_EXPECT(WindowClosing);
static IUnknown *doc_unk;
static IMoniker *doc_mon;
@@ -232,7 +238,7 @@
static const char css_data[] = "body {color: red; margin: 0}";
static const WCHAR http_urlW[] =
-
{'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g',0};
+
{'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/','t','e','s','t','s','/','w','i','n','e','h','q','_','s','n','a','p','s','h','o','t','/',0};
static const WCHAR doc_url[] =
{'w','i','n','e','t','e','s','t',':','d','o','c',0};
@@ -257,7 +263,7 @@
if(!riid)
return "(null)";
- sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
riid->Data4[5], riid->Data4[6], riid->Data4[7]);
@@ -940,6 +946,9 @@
case 1012:
CHECK_EXPECT2(OnChanged_1012);
return S_OK;
+ case 1014:
+ CHECK_EXPECT2(OnChanged_1014);
+ return S_OK;
case 1030:
case 3000022:
case 3000023:
@@ -1104,7 +1113,12 @@
REFIID riid,
void **ppvObject)
{
- ok(0, "unexpected call\n");
+ *ppvObject = NULL;
+
+ if(IsEqualGUID(&IID_IGetBindHandle, riid))
+ return E_NOINTERFACE;
+
+ ok(0, "unexpected call %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
@@ -1160,6 +1174,8 @@
static IWinInetHttpInfo WinInetHttpInfo = { &WinInetHttpInfoVtbl };
+DEFINE_GUID(IID_unk_binding,
0xf3d8f080,0xa5eb,0x476f,0x9d,0x19,0xa5,0xef,0x24,0xe5,0xc2,0xe6);
+
static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IUnknown, riid)) {
@@ -1172,7 +1188,12 @@
return S_OK;
}
- ok(0, "unexpected call\n");
+ if(IsEqualGUID(&IID_unk_binding, riid)) {
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ ok(0, "unexpected call %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
@@ -2728,12 +2749,9 @@
static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
*pguidCmdGroup,
DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
{
- if((!pguidCmdGroup || !IsEqualGUID(pguidCmdGroup, &CGID_Explorer))
- && (!pguidCmdGroup || !IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)
- || (nCmdID != 63 && (!is_refresh || nCmdID != 37))))
+ if(!pguidCmdGroup) {
test_readyState(NULL);
- if(!pguidCmdGroup) {
switch(nCmdID) {
case OLECMDID_SETPROGRESSMAX:
CHECK_EXPECT2(Exec_SETPROGRESSMAX);
@@ -2820,6 +2838,8 @@
}
if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) {
+ if(nCmdID != 63 && (!is_refresh || nCmdID != 37))
+ test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) {
@@ -2873,7 +2893,7 @@
CHECK_EXPECT(Exec_ShellDocView_67);
ok(pvaIn != NULL, "pvaIn == NULL\n");
ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn) = %d\n", V_VT(pvaIn));
- ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s,
expected %s\n",
+ ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s,
expected \"%s\"\n",
wine_dbgstr_w(V_BSTR(pvaIn)), nav_serv_url);
ok(pvaOut != NULL, "pvaOut == NULL\n");
ok(V_VT(pvaOut) == VT_BOOL, "V_VT(pvaOut) = %d\n", V_VT(pvaOut));
@@ -2922,6 +2942,9 @@
return E_NOTIMPL;
+ case 134: /* TODO */
+ case 136: /* TODO */
+ case 139: /* TODO */
case 143: /* TODO */
case 144: /* TODO */
return E_NOTIMPL;
@@ -2933,6 +2956,7 @@
}
if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) {
+ test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) {
@@ -2950,6 +2974,9 @@
switch(nCmdID) {
case DOCHOST_DOCCANNAVIGATE:
CHECK_EXPECT(Exec_DOCCANNAVIGATE);
+
+ test_readyState(NULL);
+
ok(pvaIn != NULL, "pvaIn == NULL\n");
ok(pvaOut == NULL, "pvaOut != NULL\n");
ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n");
@@ -2961,6 +2988,8 @@
LONG ind=0;
VARIANT var;
HRESULT hres;
+
+ test_readyState(NULL);
ok(pvaIn != NULL, "pvaIn == NULL\n");
ok(pvaOut != NULL || broken(!pvaOut), "pvaOut != NULL\n");
@@ -3013,6 +3042,7 @@
}
if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) {
+ test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) {
@@ -3042,6 +3072,8 @@
}
if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) {
+ test_readyState(NULL);
+
switch (nCmdID) {
case OLECMDID_PAGEACTIONBLOCKED: /* win2k3 */
SET_EXPECT(SetStatusText);
@@ -3213,13 +3245,14 @@
static HRESULT WINAPI TravelLog_QueryInterface(ITravelLog *iface, REFIID riid, void
**ppv)
{
static const IID IID_IIETravelLog2 =
{0xb67cefd2,0xe3f1,0x478a,{0x9b,0xfa,0xd8,0x93,0x70,0x37,0x5e,0x94}};
+ static const IID IID_unk_travellog =
{0x6afc8b7f,0xbc17,0x4a95,{0x90,0x2f,0x6f,0x5c,0xb5,0x54,0xc3,0xd8}};
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITravelLog, riid)) {
*ppv = iface;
return S_OK;
}
- if(!IsEqualGUID(&IID_IIETravelLog2, riid))
+ if(!IsEqualGUID(&IID_IIETravelLog2, riid) &&
!IsEqualGUID(&IID_unk_travellog, riid))
ok(0, "unexpected call %s\n", debugstr_guid(riid));
*ppv = NULL;
@@ -3292,10 +3325,13 @@
return E_NOTIMPL;
}
+static IBrowserService BrowserService;
static DWORD WINAPI TravelLog_CountEntries(ITravelLog *iface, IUnknown *punk)
{
CHECK_EXPECT(CountEntries);
- return E_NOTIMPL;
+
+ ok(punk == (IUnknown*)&BrowserService, "punk != &BrowserService
(%p)\n", punk);
+ return 0;
}
static HRESULT WINAPI TravelLog_Revert(ITravelLog *iface)
@@ -3350,7 +3386,7 @@
ok(!pDispatch, "pDispatch = %p\n", pDispatch);
ok(!strcmp_wa(lpszUrl, nav_url), "lpszUrl = %s, expected %s\n",
wine_dbgstr_w(lpszUrl), nav_url);
- ok(dwFlags == 0x40 || !dwFlags, "dwFlags = %x\n", dwFlags);
+ ok(dwFlags == 0x40 || !dwFlags || dwFlags == 0x50, "dwFlags = %x\n",
dwFlags);
ok(!lpszFrameName, "lpszFrameName = %s\n", wine_dbgstr_w(lpszFrameName));
ok(!pPostData, "pPostData = %p\n", pPostData);
ok(!cbPostData, "cbPostData = %d\n", cbPostData);
@@ -3940,6 +3976,244 @@
return E_NOINTERFACE;
}
+static HRESULT WINAPI WBE2Sink_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
+{
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IDispatch, riid)) {
+ *ppv = iface;
+ return S_OK;
+ }
+
+ *ppv = NULL;
+ ok(0, "unexpected riid: %s\n", debugstr_guid(riid));
+ return E_NOINTERFACE;
+}
+
+static HRESULT WINAPI WBE2Sink_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID
riid,
+ LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo, UINT *puArgErr)
+{
+ ok(IsEqualGUID(&IID_NULL, riid), "riid != IID_NULL\n");
+ ok(pdp != NULL, "pDispParams == NULL\n");
+ ok(pExcepInfo == NULL, "pExcepInfo=%p, expected NULL\n", pExcepInfo);
+ ok(puArgErr == NULL, "puArgErr != NULL\n");
+ ok(pVarResult == NULL, "pVarResult != NULL\n");
+ ok(wFlags == DISPATCH_METHOD, "wFlags=%08x, expected DISPATCH_METHOD\n",
wFlags);
+ ok(!pdp->cNamedArgs, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs);
+ ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs = %p\n",
pdp->rgdispidNamedArgs);
+
+ switch(dispIdMember) {
+ case DISPID_WINDOWCLOSING: {
+ VARIANT *is_child = pdp->rgvarg+1, *cancel = pdp->rgvarg;
+
+ CHECK_EXPECT(WindowClosing);
+
+ ok(pdp->cArgs == 2, "pdp->cArgs = %d\n", pdp->cArgs);
+ ok(V_VT(is_child) == VT_BOOL, "V_VT(is_child) = %d\n",
V_VT(is_child));
+ ok(!V_BOOL(is_child), "V_BOOL(is_child) = %x\n", V_BOOL(is_child));
+ ok(V_VT(cancel) == (VT_BYREF|VT_BOOL), "V_VT(cancel) = %d\n",
V_VT(cancel));
+ ok(!*V_BOOLREF(cancel), "*V_BOOLREF(cancel) = %x\n",
*V_BOOLREF(cancel));
+
+ *V_BOOLREF(cancel) = VARIANT_TRUE;
+ return S_OK;
+ }
+ default:
+ ok(0, "unexpected id %d\n", dispIdMember);
+ }
+
+ return E_NOTIMPL;
+}
+
+static const IDispatchVtbl WBE2SinkVtbl = {
+ WBE2Sink_QueryInterface,
+ Dispatch_AddRef,
+ Dispatch_Release,
+ Dispatch_GetTypeInfoCount,
+ Dispatch_GetTypeInfo,
+ Dispatch_GetIDsOfNames,
+ WBE2Sink_Invoke
+};
+
+static IDispatch WBE2Sink = { &WBE2SinkVtbl };
+
+static HRESULT WINAPI EnumConnections_QueryInterface(IEnumConnections *iface, REFIID
riid, LPVOID *ppv)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI EnumConnections_AddRef(IEnumConnections *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI EnumConnections_Release(IEnumConnections *iface)
+{
+ return 1;
+}
+
+static BOOL next_called;
+
+static HRESULT WINAPI EnumConnections_Next(IEnumConnections *iface, ULONG cConnections,
CONNECTDATA *rgcd, ULONG *pcFetched)
+{
+ CHECK_EXPECT2(EnumConnections_Next);
+
+ ok(cConnections == 1, "cConnections = %d\n", cConnections);
+ ok(pcFetched != NULL, "pcFetched == NULL\n");
+
+ if(next_called) {
+ *pcFetched = 0;
+ return S_FALSE;
+ }
+
+ next_called = TRUE;
+ rgcd->pUnk = (IUnknown*)&WBE2Sink;
+ rgcd->dwCookie = 0xdeadbeef;
+ *pcFetched = 1;
+ return S_OK;
+}
+
+static HRESULT WINAPI EnumConnections_Skip(IEnumConnections *iface, ULONG ulConnections)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static HRESULT WINAPI EnumConnections_Reset(IEnumConnections *iface)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static HRESULT WINAPI EnumConnections_Clone(IEnumConnections *iface, IEnumConnections
**ppEnum)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static const IEnumConnectionsVtbl EnumConnectionsVtbl = {
+ EnumConnections_QueryInterface,
+ EnumConnections_AddRef,
+ EnumConnections_Release,
+ EnumConnections_Next,
+ EnumConnections_Skip,
+ EnumConnections_Reset,
+ EnumConnections_Clone
+};
+
+static IEnumConnections EnumConnections = { &EnumConnectionsVtbl };
+
+static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID
riid, LPVOID *ppv)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID
*pIID)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint
*iface,
+ IConnectionPointContainer **ppCPC)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink,
DWORD *pdwCookie)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
IEnumConnections **ppEnum)
+{
+ CHECK_EXPECT(EnumConnections);
+
+ *ppEnum = &EnumConnections;
+ next_called = FALSE;
+ return S_OK;
+}
+
+static const IConnectionPointVtbl ConnectionPointVtbl =
+{
+ ConnectionPoint_QueryInterface,
+ ConnectionPoint_AddRef,
+ ConnectionPoint_Release,
+ ConnectionPoint_GetConnectionInterface,
+ ConnectionPoint_GetConnectionPointContainer,
+ ConnectionPoint_Advise,
+ ConnectionPoint_Unadvise,
+ ConnectionPoint_EnumConnections
+};
+
+static IConnectionPoint ConnectionPointWBE2 = { &ConnectionPointVtbl };
+
+static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer
*iface,
+ REFIID riid, void **ppv)
+{
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI
ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface,
+ IEnumConnectionPoints **ppEnum)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI
ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
+ REFIID riid, IConnectionPoint **ppCP)
+{
+ CHECK_EXPECT(FindConnectionPoint);
+
+ if(IsEqualGUID(riid, &DIID_DWebBrowserEvents2)) {
+ *ppCP = &ConnectionPointWBE2;
+ return S_OK;
+ }
+
+ ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ return E_NOTIMPL;
+}
+
+static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
+ ConnectionPointContainer_QueryInterface,
+ ConnectionPointContainer_AddRef,
+ ConnectionPointContainer_Release,
+ ConnectionPointContainer_EnumConnectionPoints,
+ ConnectionPointContainer_FindConnectionPoint
+};
+
+static IConnectionPointContainer ConnectionPointContainer = {
&ConnectionPointContainerVtbl };
+
static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid, void
**ppv)
{
*ppv = NULL;
@@ -3952,6 +4226,11 @@
if(IsEqualGUID(riid, &IID_IOleObject))
return E_NOINTERFACE; /* TODO */
+
+ if(IsEqualGUID(riid, &IID_IConnectionPointContainer)) {
+ *ppv = &ConnectionPointContainer;
+ return S_OK;
+ }
ok(0, "unexpected call %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
@@ -4653,6 +4932,7 @@
DEFINE_GUID(IID_IRenMailEditor,
0x000670BA,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
DEFINE_GUID(IID_unk4, 0x305104a6,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
DEFINE_GUID(IID_IDocHostUIHandlerPriv,
0xf0d241d1,0x5d0e,0x4e85,0xbc,0xb4,0xfa,0xd7,0xf7,0xc5,0x52,0x8c);
+DEFINE_GUID(IID_unk5, 0x5f95accc,0xd7a1,0x4574,0xbc,0xcb,0x69,0x71,0x35,0xbc,0x41,0xde);
static HRESULT QueryInterface(REFIID riid, void **ppv)
{
@@ -4692,6 +4972,8 @@
return E_NOINTERFACE; /* ? */
else if(IsEqualGUID(&IID_unk4, riid))
return E_NOINTERFACE; /* ? */
+ else if(IsEqualGUID(&IID_unk5, riid))
+ return E_NOINTERFACE; /* IE10 */
else if(IsEqualGUID(&IID_IDocHostUIHandlerPriv, riid))
return E_NOINTERFACE; /* ? */
else
@@ -5031,7 +5313,7 @@
CHECK_CALLED(Exec_ShellDocView_37);
todo_wine CHECK_CALLED_BROKEN(IsErrorUrl);
}else {
- todo_wine CHECK_CALLED(GetTravelLog);
+ CHECK_CALLED(GetTravelLog);
}
CHECK_CALLED_BROKEN(Exec_ShellDocView_84);
todo_wine CHECK_CALLED(GetPendingUrl);
@@ -5055,6 +5337,7 @@
#define DWL_EXPECT_HISTUPDATE 0x0080
#define DWL_FROM_HISTORY 0x0100
#define DWL_REFRESH 0x0200
+#define DWL_EX_GETHOSTINFO 0x0400
static void test_download(DWORD flags)
{
@@ -5077,7 +5360,7 @@
}
if(flags & (DWL_VERBDONE|DWL_HTTP))
SET_EXPECT(Exec_SETPROGRESSMAX);
- if((flags & DWL_VERBDONE) && !load_from_stream && !is_js)
+ if(flags & DWL_EX_GETHOSTINFO)
SET_EXPECT(GetHostInfo);
SET_EXPECT(SetStatusText);
if(!(flags & DWL_EMPTY))
@@ -5163,7 +5446,7 @@
CHECK_CALLED(Exec_SETPROGRESSMAX);
if(flags & DWL_HTTP)
SET_CALLED(Exec_SETPROGRESSMAX);
- if((flags & DWL_VERBDONE) && !load_from_stream && !is_js) {
+ if(flags & DWL_EX_GETHOSTINFO) {
if(nav_url)
todo_wine CHECK_CALLED(GetHostInfo);
else
@@ -5441,7 +5724,7 @@
if(is_js)
ignore_external_qi = TRUE;
- test_download(DWL_VERBDONE | (is_js ? DWL_JAVASCRIPT : DWL_ONREADY_LOADING) |
dwl_flags);
+ test_download(DWL_VERBDONE | (is_js ? DWL_JAVASCRIPT :
DWL_ONREADY_LOADING|DWL_EX_GETHOSTINFO) | dwl_flags);
if(is_js)
ignore_external_qi = FALSE;
@@ -5472,8 +5755,8 @@
ok(hres == S_OK, "Could not get IPersistHistory iface: %08x\n", hres);
prev_url = nav_url;
- nav_url = "http://www.winehq.org/#test";
- nav_serv_url = "http://www.winehq.org/";
+ nav_url = "http://test.winehq.org/tests/winehq_snapshot/#test";
+ nav_serv_url = "http://test.winehq.org/tests/winehq_snapshot/";
SET_EXPECT(Exec_ShellDocView_138);
SET_EXPECT(Exec_ShellDocView_67);
@@ -5493,11 +5776,34 @@
load_state = LD_LOADING;
test_timer(EXPECT_UPDATEUI|EXPECT_SETTITLE);
-
test_download(DWL_VERBDONE|DWL_HTTP|DWL_EXPECT_HISTUPDATE|DWL_ONREADY_LOADING|DWL_FROM_HISTORY);
+
test_download(DWL_VERBDONE|DWL_HTTP|DWL_EXPECT_HISTUPDATE|DWL_ONREADY_LOADING|DWL_FROM_HISTORY|DWL_EX_GETHOSTINFO);
IPersistHistory_Release(per_hist);
IStream_Release(history_stream);
history_stream = NULL;
+}
+
+static void test_OmHistory(IHTMLDocument2 *doc)
+{
+ IHTMLWindow2 *win;
+ IOmHistory *hist;
+ short len;
+ HRESULT hres;
+
+ hres = IHTMLDocument2_get_parentWindow(doc, &win);
+ ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
+
+ hres = IHTMLWindow2_get_history(win, &hist);
+ ok(hres == S_OK, "get_history failed: %08x\n", hres);
+ IHTMLWindow2_Release(win);
+
+ SET_EXPECT(CountEntries);
+ hres = IOmHistory_get_length(hist, &len);
+ CHECK_CALLED(CountEntries);
+ ok(hres == S_OK, "get_length failed: %08x\n", hres);
+ ok(len == 0, "len = %d\n", len);
+
+ IOmHistory_Release(hist);
}
static void test_refresh(IHTMLDocument2 *doc)
@@ -5521,7 +5827,7 @@
IOleCommandTarget_Release(cmdtrg);
- test_download(DWL_VERBDONE|DWL_HTTP|DWL_ONREADY_LOADING|DWL_REFRESH);
+
test_download(DWL_VERBDONE|DWL_HTTP|DWL_ONREADY_LOADING|DWL_REFRESH|DWL_EX_GETHOSTINFO);
}
static void test_open_window(IHTMLDocument2 *doc, BOOL do_block)
@@ -5575,7 +5881,32 @@
hres = IHTMLWindow2_close(new_window);
ok(hres == S_OK, "close failed: %08x\n", hres);
- }
+ IHTMLWindow2_Release(new_window);
+ }
+
+ IHTMLWindow2_Release(window);
+}
+
+static void test_window_close(IHTMLDocument2 *doc)
+{
+ IHTMLWindow2 *window;
+ HRESULT hres;
+
+ hres = IHTMLDocument2_get_parentWindow(doc, &window);
+ ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
+
+ SET_EXPECT(FindConnectionPoint);
+ SET_EXPECT(EnumConnections);
+ SET_EXPECT(EnumConnections_Next);
+ SET_EXPECT(WindowClosing);
+
+ hres = IHTMLWindow2_close(window);
+ ok(hres == S_OK, "close failed: %08x\n", hres);
+
+ CHECK_CALLED(FindConnectionPoint);
+ CHECK_CALLED(EnumConnections);
+ CHECK_CALLED(EnumConnections_Next);
+ CHECK_CALLED(WindowClosing);
IHTMLWindow2_Release(window);
}
@@ -6092,7 +6423,7 @@
CHECK_CALLED(Invoke_AMBIENT_USERAGENT);
CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* not called on IE9 */
CLEAR_CALLED(GetOverrideKeyPath); /* Called by IE9 */
- todo_wine CHECK_CALLED(GetTravelLog);
+ CHECK_CALLED(GetTravelLog);
CHECK_CALLED_BROKEN(Exec_ShellDocView_84);
set_clientsite = TRUE;
@@ -6996,9 +7327,9 @@
test_travellog(doc);
test_binding_ui((IUnknown*)doc);
- nav_url = nav_serv_url = "http://www.winehq.org/"; /* for valid prev
nav_url */
+ nav_url = nav_serv_url = "http://test.winehq.org/tests/winehq_snapshot/";
/* for valid prev nav_url */
if(support_wbapp) {
- test_put_href(doc, FALSE, "#test",
"http://www.winehq.org/#test", FALSE, TRUE, 0);
+ test_put_href(doc, FALSE, "#test",
"http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0);
test_travellog(doc);
test_refresh(doc);
}
@@ -7007,6 +7338,7 @@
test_put_href(doc, TRUE, NULL, "about:replace", FALSE, FALSE, 0);
if(support_wbapp) {
test_load_history(doc);
+ test_OmHistory(doc);
test_put_href(doc, FALSE, NULL, "about:blank", FALSE, FALSE,
support_wbapp ? DWL_EXPECT_HISTUPDATE : 0);
}
@@ -7014,6 +7346,8 @@
test_open_window(doc, TRUE);
if(!support_wbapp) /* FIXME */
test_open_window(doc, FALSE);
+ if(support_wbapp)
+ test_window_close(doc);
test_InPlaceDeactivate(doc, TRUE);
test_Close(doc, FALSE);
@@ -7216,7 +7550,7 @@
IOleDocumentView_Release(docview);
}
-static void test_editing_mode(BOOL do_load)
+static void test_editing_mode(BOOL do_load, BOOL use_design_mode)
{
IHTMLDocument2 *doc;
IUnknown *unk;
@@ -7224,7 +7558,7 @@
DWORD conn;
HRESULT hres;
- trace("Testing HTMLDocument (edit%s)...\n", do_load ? " load" :
"");
+ trace("Testing HTMLDocument (edit%s%s)...\n", do_load ? " load" :
"", use_design_mode ? " using designMode" : "");
init_test(do_load ? LD_DOLOAD : LD_NO);
call_UIActivate = CallUIActivate_AfterShow;
@@ -7249,13 +7583,74 @@
if(do_load)
test_Persist(doc, &Moniker);
stream_read = protocol_read = 0;
- test_exec_editmode(unk, do_load);
- test_UIDeactivate();
- call_UIActivate = CallUIActivate_None;
+
+ if(!use_design_mode) {
+ test_exec_editmode(unk, do_load);
+ test_UIDeactivate();
+ call_UIActivate = CallUIActivate_None;
+ }else {
+ BSTR on;
+
+ SET_EXPECT(Exec_SETTITLE);
+ test_download(DWL_VERBDONE|DWL_CSS|DWL_TRYCSS);
+ CLEAR_CALLED(Exec_SETTITLE);
+
+ editmode = TRUE;
+ load_state = LD_DOLOAD;
+ readystate_set_loading = TRUE;
+
+ SET_EXPECT(OnChanged_1005);
+ SET_EXPECT(ActiveElementChanged);
+ SET_EXPECT(GetClassID);
+ SET_EXPECT(SetStatusText);
+ SET_EXPECT(Exec_ShellDocView_37);
+ SET_EXPECT(GetHostInfo);
+ SET_EXPECT(GetDisplayName);
+ SET_EXPECT(Invoke_AMBIENT_SILENT);
+ SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
+ SET_EXPECT(OnChanged_READYSTATE);
+ SET_EXPECT(Invoke_OnReadyStateChange_Loading);
+ SET_EXPECT(IsSystemMoniker);
+ SET_EXPECT(Exec_ShellDocView_84);
+ SET_EXPECT(BindToStorage);
+ SET_EXPECT(InPlaceUIWindow_SetActiveObject);
+ SET_EXPECT(HideUI);
+ SET_EXPECT(ShowUI);
+ SET_EXPECT(InPlaceFrame_SetBorderSpace);
+ SET_EXPECT(OnChanged_1014);
+
+ on = a2bstr("On");
+ hres = IHTMLDocument2_put_designMode(doc, on);
+ SysFreeString(on);
+ ok(hres == S_OK, "put_designMode failed: %08x\n", hres);
+
+ todo_wine CHECK_CALLED(OnChanged_1005);
+ todo_wine CHECK_CALLED(ActiveElementChanged);
+ CHECK_CALLED(GetClassID);
+ CHECK_CALLED(SetStatusText);
+ CHECK_CALLED(Exec_ShellDocView_37);
+ CHECK_CALLED(GetHostInfo);
+ CHECK_CALLED(GetDisplayName);
+ CHECK_CALLED(Invoke_AMBIENT_SILENT);
+ CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
+ CHECK_CALLED(OnChanged_READYSTATE);
+ CHECK_CALLED(Invoke_OnReadyStateChange_Loading);
+ CLEAR_CALLED(IsSystemMoniker); /* IE7 */
+ CHECK_CALLED_BROKEN(Exec_ShellDocView_84);
+ CHECK_CALLED(BindToStorage);
+ CHECK_CALLED(InPlaceUIWindow_SetActiveObject);
+ CHECK_CALLED(HideUI);
+ CHECK_CALLED(ShowUI);
+ CHECK_CALLED(InPlaceFrame_SetBorderSpace);
+ CHECK_CALLED(OnChanged_1014);
+
+ test_timer(EXPECT_UPDATEUI|EXPECT_SETTITLE);
+ }
+
IOleObject_Release(oleobj);
test_MSHTML_QueryStatus(doc, OLECMDF_SUPPORTED);
- test_download(DWL_VERBDONE | (do_load ? DWL_CSS|DWL_TRYCSS : 0));
+ test_download(DWL_VERBDONE | DWL_EX_GETHOSTINFO | (do_load ? DWL_CSS|DWL_TRYCSS :
0));
SET_EXPECT(SetStatusText); /* ignore race in native mshtml */
test_timer(EXPECT_UPDATEUI);
@@ -7358,7 +7753,7 @@
CHECK_CALLED(QueryStatus_SETPROGRESSTEXT);
CHECK_CALLED(Exec_SETPROGRESSMAX);
CHECK_CALLED(Exec_SETPROGRESSPOS);
- todo_wine CHECK_CALLED(GetTravelLog);
+ CHECK_CALLED(GetTravelLog);
CHECK_CALLED_BROKEN(Exec_ShellDocView_84);
hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite);
@@ -7575,10 +7970,11 @@
test_HTMLDocument_StreamLoad();
test_HTMLDocument_StreamInitNew();
if (winetest_interactive)
- test_editing_mode(FALSE);
+ test_editing_mode(FALSE, FALSE);
else
- skip("Skipping test_editing_mode(FALSE). ROSTESTS-113.\n");
- test_editing_mode(TRUE);
+ skip("Skipping test_editing_mode(FALSE, FALSE). ROSTESTS-113.\n");
+ test_editing_mode(TRUE, FALSE);
+ test_editing_mode(TRUE, TRUE);
if (winetest_interactive)
{
test_HTMLDocument_http(FALSE);
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] Mon Oct 7 14:23:51 2013
@@ -137,6 +137,8 @@
e.onmousedown = function(x) { this.onmousedown_called = x; };
e.onmousedown("test");
ok(e.onmousedown_called === "test", "e.onmousedown_called = " +
e.onmousedown_called);
+
+ ok(document.all("divid").tagName === "DIV",
"document.all('divid').tagName = " +
document.all("divid").tagName);
}
function test_arg_conv() {
@@ -175,6 +177,39 @@
}
ok(cnt > 100, "cnt = " + cnt);
+}
+
+function test_customtag() {
+ document.body.innerHTML = 'test<unk><br>';
+
+ var children = document.body.childNodes;
+
+ ok(children.length === 3, "children.length = " + children.length);
+ ok(children[0].data === "test", "children[0].data = " +
children[0].data);
+ ok(children[1].tagName === "UNK", "children[1].tagName = " +
children[1].tagName);
+ ok(children[2].tagName === "BR", "children[2].tagName = " +
children[2].tagName);
+}
+
+function test_whitespace_nodes() {
+ document.body.innerHTML = '<table id="tid"> <tr>
\t<td>\n \t<div></div> </td>\n </tr> </table>';
+
+ var t = document.getElementById("tid");
+ ok(t.childNodes.length === 1, "t.childNodes.length = " +
t.childNodes.length);
+ ok(t.childNodes[0].tagName === "TBODY", "t.childNodes[0].tagName =
" + t.childNodes[0].tagName);
+
+ var row = t.rows[0];
+ ok(row.childNodes.length === 1, "row.childNodes.length = " +
row.childNodes.length);
+ ok(row.childNodes[0].tagName === "TD", "row.childNodes[0].tagName =
" + row.childNodes[0].tagName);
+
+ var cell = row.cells[0];
+ ok(cell.childNodes.length === 1, "cell.childNodes.length = " +
cell.childNodes.length);
+
+
+ document.body.innerHTML = '<table id="tid"> x<tr>
\tx<td>\n \tx<div></div> </td>\n </tr> </table>';
+
+ 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);
}
var globalVar = false;
@@ -198,6 +233,8 @@
test_arg_conv();
test_override_functions();
test_forin();
+ test_customtag();
+ test_whitespace_nodes();
var r = window.execScript("globalVar = true;");
ok(r === undefined, "execScript returned " + r);
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] Mon Oct 7 14:23:51 2013
@@ -27,6 +27,7 @@
//#include "ole2.h"
//#include "urlmon.h"
#include <shlwapi.h>
+#include <wininet.h>
#include <initguid.h>
@@ -72,6 +73,9 @@
static const WCHAR about_test_url[] =
{'a','b','o','u','t',':','t','e','s','t',0};
static const WCHAR about_res_url[] =
{'r','e','s',':','b','l','a','n','k',0};
static const WCHAR javascript_test_url[] =
{'j','a','v','a','s','c','r','i','p','t',':','t','e','s','t','(',')',0};
+
+static WCHAR res_url_base[INTERNET_MAX_URL_LENGTH] =
{'r','e','s',':','/','/'};
+static unsigned res_url_base_len;
static const char *debugstr_guid(REFIID riid)
{
@@ -248,7 +252,7 @@
CHECK_CALLED(ReportResult);
}
-static void protocol_start(IInternetProtocol *protocol, LPCWSTR url)
+static void protocol_start(IInternetProtocol *protocol, const WCHAR *url)
{
HRESULT hres;
@@ -266,6 +270,33 @@
CHECK_CALLED(ReportProgress);
CHECK_CALLED(ReportData);
CHECK_CALLED(ReportResult);
+}
+
+static void test_res_url(const char *url_suffix)
+{
+ WCHAR url[INTERNET_MAX_URL_LENGTH];
+ IInternetProtocol *protocol;
+ ULONG size, ref;
+ BYTE buf[100];
+ HRESULT hres;
+
+ memcpy(url, res_url_base, res_url_base_len*sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, url_suffix, -1, url+res_url_base_len,
sizeof(url)/sizeof(WCHAR)-res_url_base_len);
+
+ hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER,
&IID_IInternetProtocol, (void**)&protocol);
+ ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
+
+ protocol_start(protocol, url);
+
+ hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &size);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+
+
+ ref = IInternetProtocol_Release(protocol);
+ ok(!ref, "ref=%u\n", ref);
}
static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
@@ -578,6 +609,10 @@
}
IUnknown_Release(unk);
+
+ test_res_url("/jstest.html");
+ test_res_url("/Test/res.html");
+ test_res_url("/test/dir/dir2/res.html");
}
static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
@@ -908,6 +943,8 @@
START_TEST(protocol)
{
+ res_url_base_len = 6 + GetModuleFileNameW(NULL, res_url_base + 6 /*
strlen("res://") */, sizeof(res_url_base)/sizeof(WCHAR)-6);
+
OleInitialize(NULL);
test_res_protocol();
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] Mon Oct 7 14:23:51 2013
@@ -33,3 +33,11 @@
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
+
+/* For res: protocol test: */
+
+/* @makedep: jstest.html */
+res.html test "jstest.html"
+
+/* @makedep: jstest.html */
+dir/dir2/res.html test "jstest.html"
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] Mon Oct 7 14:23:51 2013
@@ -1768,6 +1768,8 @@
ok(V_VT(pvarValue) == VT_BOOL, "V_VT(pvarValue)=%d\n",
V_VT(pvarValue));
ok(V_BOOL(pvarValue) == VARIANT_TRUE, "V_BOOL(pvarValue)=%x\n",
V_BOOL(pvarValue));
break;
+ case 0x70000003: /* Undocumented property set by IE10 */
+ return E_NOTIMPL;
default:
ok(0, "unexpected property %x\n", dwProperty);
return E_NOTIMPL;
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] Mon Oct 7 14:23:51 2013
@@ -73,6 +73,17 @@
return elem;
}
+#define get_current_style2_iface(u) _get_current_style2_iface(__LINE__,u)
+static IHTMLCurrentStyle2 *_get_current_style2_iface(unsigned line, IUnknown *unk)
+{
+ IHTMLCurrentStyle2 *current_style2;
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLCurrentStyle2,
(void**)¤t_style2);
+ ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2: %08x\n",
hres);
+ return current_style2;
+}
+
static IHTMLElement *get_element_by_id(IHTMLDocument2 *doc, const char *id)
{
HRESULT hres;
@@ -2017,6 +2028,22 @@
ok(hres == S_OK, "get_pageBreakBefore failed: %08x\n", hres);
ok(!str, "pageBreakBefore = %s\n", wine_dbgstr_w(str));
+ str = (void*)0xdeadbeef;
+ hres = IHTMLStyle_get_whiteSpace(style, &str);
+ ok(hres == S_OK, "get_whiteSpace failed: %08x\n", hres);
+ ok(!str, "whiteSpace = %s\n", wine_dbgstr_w(str));
+
+ str = a2bstr("nowrap");
+ hres = IHTMLStyle_put_whiteSpace(style, str);
+ SysFreeString(str);
+ ok(hres == S_OK, "put_whiteSpace failed: %08x\n", hres);
+
+ str = NULL;
+ hres = IHTMLStyle_get_whiteSpace(style, &str);
+ ok(hres == S_OK, "get_whiteSpace failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "nowrap"), "whiteSpace = %s\n",
wine_dbgstr_w(str));
+ SysFreeString(str);
+
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) {
@@ -2100,9 +2127,7 @@
hres = IHTMLElement2_get_currentStyle(elem2, ¤t_style);
ok(hres == S_OK, "get_style failed: %08x\n", hres);
- hres = IHTMLCurrentStyle_QueryInterface(current_style, &IID_IHTMLCurrentStyle2,
(void**)¤t_style2);
- IHTMLCurrentStyle_Release(current_style);
- ok(hres == S_OK, "Could not get IHTMLCurrentStyle2 iface: %08x\n", hres);
+ current_style2 = get_current_style2_iface((IUnknown*)current_style);
test_style_filter(style, NULL);
test_current_style_filter(current_style2, NULL);
@@ -2131,6 +2156,8 @@
static void test_current_style(IHTMLCurrentStyle *current_style)
{
+ IHTMLCurrentStyle2 *current_style2;
+ VARIANT_BOOL b;
BSTR str;
HRESULT hres;
VARIANT v;
@@ -2390,6 +2417,15 @@
ok(hres == S_OK, "get_textIndent failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
VariantClear(&v);
+
+ current_style2 = get_current_style2_iface((IUnknown*)current_style);
+
+ b = 100;
+ hres = IHTMLCurrentStyle2_get_hasLayout(current_style2, &b);
+ ok(hres == S_OK, "get_hasLayout failed: %08x\n", hres);
+ ok(b == VARIANT_TRUE, "hasLayout = %x\n", b);
+
+ IHTMLCurrentStyle2_Release(current_style2);
}
static const char basic_test_str[] = "<html><body><div
id=\"divid\"></div/</body></html>";
Modified: trunk/rostests/winetests/mshtml/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/testlist…
==============================================================================
--- trunk/rostests/winetests/mshtml/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/mshtml/testlist.c [iso-8859-1] Mon Oct 7 14:23:51 2013
@@ -1,7 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_activex(void);
extern void func_dom(void);