Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f5f4765a
Commit
f5f4765a
authored
Jan 25, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Added text selection type tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af8e6ee6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
dom.c
dlls/mshtml/tests/dom.c
+25
-6
No files found.
dlls/mshtml/tests/dom.c
View file @
f5f4765a
...
...
@@ -5378,6 +5378,24 @@ static void test_create_img_elem(IHTMLDocument2 *doc)
}
}
#define test_doc_selection_type(a,b) _test_doc_selection_type(__LINE__,a,b)
static
void
_test_doc_selection_type
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
type
)
{
IHTMLSelectionObject
*
selection
;
BSTR
str
;
HRESULT
hres
;
hres
=
IHTMLDocument2_get_selection
(
doc
,
&
selection
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_selection failed: %08x
\n
"
,
hres
);
hres
=
IHTMLSelectionObject_get_type
(
selection
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
str
,
type
),
"type = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
type
);
SysFreeString
(
str
);
IHTMLSelectionObject_Release
(
selection
);
}
#define insert_adjacent_elem(a,b,c) _insert_adjacent_elem(__LINE__,a,b,c)
static
void
_insert_adjacent_elem
(
unsigned
line
,
IHTMLElement
*
parent
,
const
char
*
where
,
IHTMLElement
*
elem
)
{
...
...
@@ -5702,6 +5720,11 @@ static void test_txtrange(IHTMLDocument2 *doc)
test_range_set_end_point
(
range
,
"xxx"
,
body_range
,
E_INVALIDARG
);
hres
=
IHTMLTxtRange_select
(
range
);
ok
(
hres
==
S_OK
,
"select failed: %08x
\n
"
,
hres
);
test_doc_selection_type
(
doc
,
"Text"
);
IHTMLTxtRange_Release
(
range
);
IHTMLTxtRange_Release
(
range2
);
IHTMLTxtRange_Release
(
body_range
);
...
...
@@ -6281,17 +6304,13 @@ static void test_default_selection(IHTMLDocument2 *doc)
IHTMLSelectionObject
*
selection
;
IHTMLTxtRange
*
range
;
IDispatch
*
disp
;
BSTR
str
;
HRESULT
hres
;
test_doc_selection_type
(
doc
,
"None"
);
hres
=
IHTMLDocument2_get_selection
(
doc
,
&
selection
);
ok
(
hres
==
S_OK
,
"get_selection failed: %08x
\n
"
,
hres
);
hres
=
IHTMLSelectionObject_get_type
(
selection
,
&
str
);
ok
(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"None"
),
"type = %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
hres
=
IHTMLSelectionObject_createRange
(
selection
,
&
disp
);
IHTMLSelectionObject_Release
(
selection
);
ok
(
hres
==
S_OK
,
"createRange failed: %08x
\n
"
,
hres
);
...
...
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