Commit 01f241c0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added more IDispatchEx tests.

parent 8ebe988d
...@@ -45,6 +45,7 @@ static const char elem_test_str[] = ...@@ -45,6 +45,7 @@ static const char elem_test_str[] =
"<textarea id=\"X\">text text</textarea>" "<textarea id=\"X\">text text</textarea>"
"<table><tbody></tbody></table>" "<table><tbody></tbody></table>"
"<script id=\"sc\" type=\"text/javascript\"></script>" "<script id=\"sc\" type=\"text/javascript\"></script>"
"<test />"
"</body></html>"; "</body></html>";
static const char indent_test_str[] = static const char indent_test_str[] =
"<html><head><title>test</title></head><body>abc<br /><a href=\"about:blank\">123</a></body></html>"; "<html><head><title>test</title></head><body>abc<br /><a href=\"about:blank\">123</a></body></html>";
...@@ -74,7 +75,8 @@ typedef enum { ...@@ -74,7 +75,8 @@ typedef enum {
ET_BR, ET_BR,
ET_TABLE, ET_TABLE,
ET_TBODY, ET_TBODY,
ET_SCRIPT ET_SCRIPT,
ET_TEST
} elem_type_t; } elem_type_t;
static REFIID const none_iids[] = { static REFIID const none_iids[] = {
...@@ -86,6 +88,7 @@ static REFIID const elem_iids[] = { ...@@ -86,6 +88,7 @@ static REFIID const elem_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -96,6 +99,7 @@ static REFIID const body_iids[] = { ...@@ -96,6 +99,7 @@ static REFIID const body_iids[] = {
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTextContainer, &IID_IHTMLTextContainer,
&IID_IHTMLBodyElement, &IID_IHTMLBodyElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -105,6 +109,7 @@ static REFIID const anchor_iids[] = { ...@@ -105,6 +109,7 @@ static REFIID const anchor_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLAnchorElement, &IID_IHTMLAnchorElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -115,6 +120,7 @@ static REFIID const input_iids[] = { ...@@ -115,6 +120,7 @@ static REFIID const input_iids[] = {
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLInputElement, &IID_IHTMLInputElement,
&IID_IHTMLInputTextElement, &IID_IHTMLInputTextElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -124,6 +130,7 @@ static REFIID const select_iids[] = { ...@@ -124,6 +130,7 @@ static REFIID const select_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLSelectElement, &IID_IHTMLSelectElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -133,6 +140,7 @@ static REFIID const textarea_iids[] = { ...@@ -133,6 +140,7 @@ static REFIID const textarea_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTextAreaElement, &IID_IHTMLTextAreaElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -142,6 +150,7 @@ static REFIID const option_iids[] = { ...@@ -142,6 +150,7 @@ static REFIID const option_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLOptionElement, &IID_IHTMLOptionElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -151,6 +160,7 @@ static REFIID const table_iids[] = { ...@@ -151,6 +160,7 @@ static REFIID const table_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTable, &IID_IHTMLTable,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -160,6 +170,7 @@ static REFIID const script_iids[] = { ...@@ -160,6 +170,7 @@ static REFIID const script_iids[] = {
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLScriptElement, &IID_IHTMLScriptElement,
&IID_IDispatchEx,
&IID_IConnectionPointContainer, &IID_IConnectionPointContainer,
NULL NULL
}; };
...@@ -174,32 +185,35 @@ static REFIID const window_iids[] = { ...@@ -174,32 +185,35 @@ static REFIID const window_iids[] = {
&IID_IDispatch, &IID_IDispatch,
&IID_IHTMLWindow2, &IID_IHTMLWindow2,
&IID_IHTMLWindow3, &IID_IHTMLWindow3,
&IID_IDispatchEx,
NULL NULL
}; };
typedef struct { typedef struct {
const char *tag; const char *tag;
REFIID *iids; REFIID *iids;
const IID *dispiid;
} elem_type_info_t; } elem_type_info_t;
static const elem_type_info_t elem_type_infos[] = { static const elem_type_info_t elem_type_infos[] = {
{"", none_iids}, {"", none_iids, NULL},
{"HTML", elem_iids}, {"HTML", elem_iids, NULL},
{"HEAD", elem_iids}, {"HEAD", elem_iids, NULL},
{"TITLE", elem_iids}, {"TITLE", elem_iids, NULL},
{"BODY", body_iids}, {"BODY", body_iids, NULL},
{"A", anchor_iids}, {"A", anchor_iids, NULL},
{"INPUT", input_iids}, {"INPUT", input_iids, NULL},
{"SELECT", select_iids}, {"SELECT", select_iids, NULL},
{"TEXTAREA", textarea_iids}, {"TEXTAREA", textarea_iids, NULL},
{"OPTION", option_iids}, {"OPTION", option_iids, NULL},
{"STYLE", elem_iids}, {"STYLE", elem_iids, NULL},
{"BLOCKQUOTE",elem_iids}, {"BLOCKQUOTE",elem_iids, NULL},
{"P", elem_iids}, {"P", elem_iids, NULL},
{"BR", elem_iids}, {"BR", elem_iids, NULL},
{"TABLE", table_iids}, {"TABLE", table_iids, NULL},
{"TBODY", elem_iids}, {"TBODY", elem_iids, NULL},
{"SCRIPT", script_iids} {"SCRIPT", script_iids, NULL},
{"TEST", elem_iids, &DIID_DispHTMLUnknownElement}
}; };
static const char *dbgstr_w(LPCWSTR str) static const char *dbgstr_w(LPCWSTR str)
...@@ -345,6 +359,9 @@ static void _test_elem_type(unsigned line, IUnknown *unk, elem_type_t type) ...@@ -345,6 +359,9 @@ static void _test_elem_type(unsigned line, IUnknown *unk, elem_type_t type)
{ {
_test_elem_tag(line, unk, elem_type_infos[type].tag); _test_elem_tag(line, unk, elem_type_infos[type].tag);
_test_ifaces(line, unk, elem_type_infos[type].iids); _test_ifaces(line, unk, elem_type_infos[type].iids);
if(elem_type_infos[type].dispiid)
_test_disp(line, unk, elem_type_infos[type].dispiid);
} }
static void test_doc_elem(IHTMLDocument2 *doc) static void test_doc_elem(IHTMLDocument2 *doc)
...@@ -1349,7 +1366,8 @@ static void test_elems(IHTMLDocument2 *doc) ...@@ -1349,7 +1366,8 @@ static void test_elems(IHTMLDocument2 *doc)
ET_TEXTAREA, ET_TEXTAREA,
ET_TABLE, ET_TABLE,
ET_TBODY, ET_TBODY,
ET_SCRIPT ET_SCRIPT,
ET_TEST
}; };
static const elem_type_t item_types[] = { static const elem_type_t item_types[] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment