Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
eb4e098c
Commit
eb4e098c
authored
Jun 19, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added createElement test.
parent
d0568d8c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
dom.c
dlls/mshtml/tests/dom.c
+44
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
eb4e098c
...
...
@@ -82,6 +82,7 @@ typedef enum {
ET_TBODY
,
ET_SCRIPT
,
ET_TEST
,
ET_TESTG
,
ET_COMMENT
,
ET_IMG
}
elem_type_t
;
...
...
@@ -234,6 +235,17 @@ static REFIID const img_iids[] = {
NULL
};
static
REFIID
const
generic_iids
[]
=
{
&
IID_IHTMLDOMNode
,
&
IID_IHTMLDOMNode2
,
&
IID_IHTMLElement
,
&
IID_IHTMLElement2
,
&
IID_IHTMLGenericElement
,
&
IID_IDispatchEx
,
&
IID_IConnectionPointContainer
,
NULL
};
typedef
struct
{
const
char
*
tag
;
REFIID
*
iids
;
...
...
@@ -259,6 +271,7 @@ static const elem_type_info_t elem_type_infos[] = {
{
"TBODY"
,
elem_iids
,
NULL
},
{
"SCRIPT"
,
script_iids
,
NULL
},
{
"TEST"
,
elem_iids
,
&
DIID_DispHTMLUnknownElement
},
{
"TEST"
,
generic_iids
,
&
DIID_DispHTMLGenericElement
},
{
"!"
,
comment_iids
,
&
DIID_DispHTMLCommentElement
},
{
"IMG"
,
img_iids
,
&
DIID_DispHTMLImg
}
};
...
...
@@ -1007,6 +1020,21 @@ static void _test_elem_client_size(unsigned line, IUnknown *unk)
IHTMLElement2_Release
(
elem
);
}
#define test_create_elem(d,t) _test_create_elem(__LINE__,d,t)
static
IHTMLElement
*
_test_create_elem
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
tag
)
{
IHTMLElement
*
elem
=
NULL
;
BSTR
tmp
;
HRESULT
hres
;
tmp
=
a2bstr
(
tag
);
hres
=
IHTMLDocument2_createElement
(
doc
,
tmp
,
&
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"createElement failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
return
elem
;
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -1849,6 +1877,21 @@ static void test_elems(IHTMLDocument2 *doc)
test_create_option_elem
(
doc
);
}
static
void
test_create_elems
(
IHTMLDocument2
*
doc
)
{
IHTMLElement
*
elem
;
long
type
;
elem
=
test_create_elem
(
doc
,
"TEST"
);
test_elem_tag
((
IUnknown
*
)
elem
,
"TEST"
);
type
=
get_node_type
((
IUnknown
*
)
elem
);
ok
(
type
==
1
,
"type=%ld
\n
"
,
type
);
test_ifaces
((
IUnknown
*
)
elem
,
elem_iids
);
test_disp
((
IUnknown
*
)
elem
,
&
DIID_DispHTMLGenericElement
);
IHTMLElement_Release
(
elem
);
}
static
void
test_exec
(
IUnknown
*
unk
,
const
GUID
*
grpid
,
DWORD
cmdid
,
VARIANT
*
in
,
VARIANT
*
out
)
{
IOleCommandTarget
*
cmdtrg
;
...
...
@@ -2082,6 +2125,7 @@ START_TEST(dom)
run_domtest
(
range_test_str
,
test_txtrange
);
run_domtest
(
range_test2_str
,
test_txtrange2
);
run_domtest
(
elem_test_str
,
test_elems
);
run_domtest
(
doc_blank
,
test_create_elems
);
run_domtest
(
doc_blank
,
test_defaults
);
run_domtest
(
indent_test_str
,
test_indent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment