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
94624ee3
Commit
94624ee3
authored
Apr 21, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf/tests: Test activation and deactivation of a text service.
parent
0cdb39fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+32
-0
No files found.
dlls/msctf/tests/inputprocessor.c
View file @
94624ee3
...
...
@@ -33,6 +33,11 @@ static ITfInputProcessorProfiles* g_ipp;
static
LANGID
gLangid
;
static
ITfCategoryMgr
*
g_cm
=
NULL
;
static
ITfThreadMgr
*
g_tm
=
NULL
;
static
TfClientId
cid
=
0
;
static
TfClientId
tid
=
0
;
static
BOOL
test_ShouldActivate
=
FALSE
;
static
BOOL
test_ShouldDeactivate
=
FALSE
;
static
DWORD
tmSinkCookie
;
static
DWORD
tmSinkRefCount
;
...
...
@@ -240,6 +245,27 @@ static void test_ThreadMgrUnadviseSinks(void)
ITfSource_Release
(
source
);
}
static
void
test_Activate
(
void
)
{
HRESULT
hr
;
hr
=
ITfInputProcessorProfiles_ActivateLanguageProfile
(
g_ipp
,
&
CLSID_FakeService
,
gLangid
,
&
CLSID_FakeService
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to Activate text service
\n
"
);
}
static
void
test_startSession
(
void
)
{
test_ShouldActivate
=
TRUE
;
ITfThreadMgr_Activate
(
g_tm
,
&
cid
);
todo_wine
ok
(
cid
!=
tid
,
"TextService id mistakenly matches Client id
\n
"
);
}
static
void
test_endSession
(
void
)
{
test_ShouldDeactivate
=
TRUE
;
ITfThreadMgr_Deactivate
(
g_tm
);
}
START_TEST
(
inputprocessor
)
{
if
(
SUCCEEDED
(
initialize
()))
...
...
@@ -250,6 +276,9 @@ START_TEST(inputprocessor)
test_EnumInputProcessorInfo
();
test_Enable
();
test_ThreadMgrAdviseSinks
();
test_Activate
();
test_startSession
();
test_endSession
();
test_EnumLanguageProfiles
();
test_FindClosestCategory
();
test_Disable
();
...
...
@@ -527,12 +556,15 @@ static HRESULT WINAPI TextService_Activate(ITfTextInputProcessor *iface,
ITfThreadMgr
*
ptim
,
TfClientId
id
)
{
trace
(
"TextService_Activate
\n
"
);
ok
(
test_ShouldActivate
,
"Activation came unexpectedly
\n
"
);
tid
=
id
;
return
S_OK
;
}
static
HRESULT
WINAPI
TextService_Deactivate
(
ITfTextInputProcessor
*
iface
)
{
trace
(
"TextService_Deactivate
\n
"
);
ok
(
test_ShouldDeactivate
,
"Deactivation came unexpectedly
\n
"
);
return
S_OK
;
}
...
...
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