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
3d6bb389
Commit
3d6bb389
authored
Jul 10, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf/tests: Test EnumDocumentMgrs.
parent
844fd922
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+45
-0
No files found.
dlls/msctf/tests/inputprocessor.c
View file @
3d6bb389
...
...
@@ -1142,6 +1142,39 @@ static void test_EnumContexts(ITfDocumentMgr *dm, ITfContext *search)
ok
(
!
found
,
"Found an ITfContext we should should not have
\n
"
);
}
static
void
test_EnumDocumentMgr
(
ITfThreadMgr
*
tm
,
ITfDocumentMgr
*
search
,
ITfDocumentMgr
*
absent
)
{
HRESULT
hr
;
IEnumTfDocumentMgrs
*
pEnum
;
BOOL
found
=
FALSE
;
BOOL
notfound
=
TRUE
;
hr
=
ITfThreadMgr_EnumDocumentMgrs
(
tm
,
&
pEnum
);
ok
(
SUCCEEDED
(
hr
),
"EnumDocumentMgrs failed
\n
"
);
if
(
SUCCEEDED
(
hr
))
{
ULONG
fetched
;
ITfDocumentMgr
*
dm
;
while
(
IEnumTfDocumentMgrs_Next
(
pEnum
,
1
,
&
dm
,
&
fetched
)
==
S_OK
)
{
if
(
!
search
)
found
=
TRUE
;
else
if
(
search
==
dm
)
found
=
TRUE
;
if
(
absent
&&
dm
==
absent
)
notfound
=
FALSE
;
ITfDocumentMgr_Release
(
dm
);
}
IEnumTfDocumentMgrs_Release
(
pEnum
);
}
if
(
search
)
ok
(
found
,
"Did not find proper ITfDocumentMgr
\n
"
);
else
ok
(
!
found
,
"Found an ITfDocumentMgr we should should not have
\n
"
);
if
(
absent
)
ok
(
notfound
,
"Found an ITfDocumentMgr we believe should be absent
\n
"
);
}
static
inline
int
check_context_refcount
(
ITfContext
*
iface
)
{
IUnknown_AddRef
(
iface
);
...
...
@@ -1174,9 +1207,21 @@ static void test_startSession(void)
hr
=
ITfThreadMgr_Deactivate
(
g_tm
);
ok
(
SUCCEEDED
(
hr
),
"Failed to Deactivate
\n
"
);
test_EnumDocumentMgr
(
g_tm
,
NULL
,
NULL
);
hr
=
ITfThreadMgr_CreateDocumentMgr
(
g_tm
,
&
g_dm
);
ok
(
SUCCEEDED
(
hr
),
"CreateDocumentMgr failed
\n
"
);
test_EnumDocumentMgr
(
g_tm
,
g_dm
,
NULL
);
hr
=
ITfThreadMgr_CreateDocumentMgr
(
g_tm
,
&
dmtest
);
ok
(
SUCCEEDED
(
hr
),
"CreateDocumentMgr failed
\n
"
);
test_EnumDocumentMgr
(
g_tm
,
dmtest
,
NULL
);
ITfDocumentMgr_Release
(
dmtest
);
test_EnumDocumentMgr
(
g_tm
,
g_dm
,
dmtest
);
hr
=
ITfThreadMgr_GetFocus
(
g_tm
,
&
dmtest
);
ok
(
SUCCEEDED
(
hr
),
"GetFocus Failed
\n
"
);
ok
(
dmtest
==
NULL
,
"Initial focus not null
\n
"
);
...
...
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