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
e35e27de
Commit
e35e27de
authored
Dec 06, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added HTMLTxtRange::Exec(IDM_INDENT) test.
parent
f5a8a450
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
dom.c
dlls/mshtml/tests/dom.c
+58
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
e35e27de
...
...
@@ -42,6 +42,8 @@ static const char elem_test_str[] =
"<textarea id=
\"
X
\"
>text text</textarea>"
"<table><tbody></tbody></table>"
"</body></html>"
;
static
const
char
indent_test_str
[]
=
"<html><head><title>test</title></head><body>abc<br /><a href=
\"
about:blank
\"
>123</a></body></html>"
;
static
const
WCHAR
noneW
[]
=
{
'N'
,
'o'
,
'n'
,
'e'
,
0
};
...
...
@@ -1209,6 +1211,61 @@ static void test_elems(IHTMLDocument2 *doc)
test_create_option_elem
(
doc
);
}
static
void
test_exec
(
IUnknown
*
unk
,
const
GUID
*
grpid
,
DWORD
cmdid
,
VARIANT
*
in
,
VARIANT
*
out
)
{
IOleCommandTarget
*
cmdtrg
;
HRESULT
hres
;
hres
=
IHTMLTxtRange_QueryInterface
(
unk
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
ok
(
hres
==
S_OK
,
"Could not get IOleCommandTarget interface: %08x
\n
"
,
hres
);
hres
=
IOleCommandTarget_Exec
(
cmdtrg
,
grpid
,
cmdid
,
0
,
in
,
out
);
ok
(
hres
==
S_OK
,
"Exec failed: %08x
\n
"
,
hres
);
IOleCommandTarget_Release
(
cmdtrg
);
}
static
void
test_indent
(
IHTMLDocument2
*
doc
)
{
IHTMLElementCollection
*
col
;
IHTMLTxtRange
*
range
;
HRESULT
hres
;
static
const
elem_type_t
all_types
[]
=
{
ET_HTML
,
ET_HEAD
,
ET_TITLE
,
ET_BODY
,
ET_BR
,
ET_A
,
};
static
const
elem_type_t
indent_types
[]
=
{
ET_HTML
,
ET_HEAD
,
ET_TITLE
,
ET_BODY
,
ET_BLOCKQUOTE
,
ET_P
,
ET_BR
,
ET_A
,
};
hres
=
IHTMLDocument2_get_all
(
doc
,
&
col
);
ok
(
hres
==
S_OK
,
"get_all failed: %08x
\n
"
,
hres
);
test_elem_collection
(
col
,
all_types
,
sizeof
(
all_types
)
/
sizeof
(
all_types
[
0
]));
IHTMLElementCollection_Release
(
col
);
range
=
test_create_body_range
(
doc
);
test_exec
((
IUnknown
*
)
range
,
&
CGID_MSHTML
,
IDM_INDENT
,
NULL
,
NULL
);
IHTMLTxtRange_Release
(
range
);
hres
=
IHTMLDocument2_get_all
(
doc
,
&
col
);
ok
(
hres
==
S_OK
,
"get_all failed: %08x
\n
"
,
hres
);
test_elem_collection
(
col
,
indent_types
,
sizeof
(
indent_types
)
/
sizeof
(
indent_types
[
0
]));
IHTMLElementCollection_Release
(
col
);
}
static
IHTMLDocument2
*
notif_doc
;
static
BOOL
doc_complete
;
...
...
@@ -1387,6 +1444,7 @@ START_TEST(dom)
run_domtest
(
doc_str2
,
test_txtrange
);
run_domtest
(
elem_test_str
,
test_elems
);
run_domtest
(
doc_blank
,
test_defaults
);
run_domtest
(
indent_test_str
,
test_indent
);
CoUninitialize
();
gecko_installer_workaround
(
FALSE
);
...
...
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