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
bc645ca7
Commit
bc645ca7
authored
May 27, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Added Push/Pop context tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79025d0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+27
-2
No files found.
dlls/msctf/tests/inputprocessor.c
View file @
bc645ca7
...
@@ -74,6 +74,7 @@ static INT test_OnPushContext = SINK_UNEXPECTED;
...
@@ -74,6 +74,7 @@ static INT test_OnPushContext = SINK_UNEXPECTED;
static
INT
test_OnPopContext
=
SINK_UNEXPECTED
;
static
INT
test_OnPopContext
=
SINK_UNEXPECTED
;
static
INT
test_KEV_OnSetFocus
=
SINK_UNEXPECTED
;
static
INT
test_KEV_OnSetFocus
=
SINK_UNEXPECTED
;
static
INT
test_ACP_AdviseSink
=
SINK_UNEXPECTED
;
static
INT
test_ACP_AdviseSink
=
SINK_UNEXPECTED
;
static
INT
test_ACP_UnadviseSink
=
SINK_UNEXPECTED
;
static
INT
test_ACP_GetStatus
=
SINK_UNEXPECTED
;
static
INT
test_ACP_GetStatus
=
SINK_UNEXPECTED
;
static
INT
test_ACP_RequestLock
=
SINK_UNEXPECTED
;
static
INT
test_ACP_RequestLock
=
SINK_UNEXPECTED
;
static
INT
test_ACP_GetEndACP
=
SINK_UNEXPECTED
;
static
INT
test_ACP_GetEndACP
=
SINK_UNEXPECTED
;
...
@@ -232,6 +233,9 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface,
...
@@ -232,6 +233,9 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface,
sink_fire_ok
(
&
test_ACP_AdviseSink
,
"TextStoreACP_AdviseSink"
);
sink_fire_ok
(
&
test_ACP_AdviseSink
,
"TextStoreACP_AdviseSink"
);
if
(
ACPSink
)
return
S_OK
;
hr
=
IUnknown_QueryInterface
(
punk
,
&
IID_ITextStoreACPSink
,
(
void
**
)
&
ACPSink
);
hr
=
IUnknown_QueryInterface
(
punk
,
&
IID_ITextStoreACPSink
,
(
void
**
)
&
ACPSink
);
ok
(
SUCCEEDED
(
hr
),
"Unable to QueryInterface on sink
\n
"
);
ok
(
SUCCEEDED
(
hr
),
"Unable to QueryInterface on sink
\n
"
);
...
@@ -245,7 +249,7 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface,
...
@@ -245,7 +249,7 @@ static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface,
static
HRESULT
WINAPI
TextStoreACP_UnadviseSink
(
ITextStoreACP
*
iface
,
static
HRESULT
WINAPI
TextStoreACP_UnadviseSink
(
ITextStoreACP
*
iface
,
IUnknown
*
punk
)
IUnknown
*
punk
)
{
{
trace
(
"
\n
"
);
sink_fire_ok
(
&
test_ACP_UnadviseSink
,
"TextStoreACP_UnadviseSink
"
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1474,7 +1478,7 @@ static void test_startSession(void)
...
@@ -1474,7 +1478,7 @@ static void test_startSession(void)
DWORD
editCookie
;
DWORD
editCookie
;
ITfDocumentMgr
*
dmtest
;
ITfDocumentMgr
*
dmtest
;
ITfContext
*
cxt
,
*
cxt2
,
*
cxt3
,
*
cxtTest
;
ITfContext
*
cxt
,
*
cxt2
,
*
cxt3
,
*
cxtTest
;
ITextStoreACP
*
ts
;
ITextStoreACP
*
ts
=
NULL
;
TfClientId
cid2
=
0
;
TfClientId
cid2
=
0
;
ITfThreadMgrEx
*
tmex
;
ITfThreadMgrEx
*
tmex
;
...
@@ -1641,6 +1645,8 @@ static void test_startSession(void)
...
@@ -1641,6 +1645,8 @@ static void test_startSession(void)
ok
(
hr
==
S_FALSE
,
"ITfContext_GetDocumentMgr wrong rc %x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"ITfContext_GetDocumentMgr wrong rc %x
\n
"
,
hr
);
ok
(
dmtest
==
NULL
,
"returned documentmgr should be null
\n
"
);
ok
(
dmtest
==
NULL
,
"returned documentmgr should be null
\n
"
);
ITfContext_Release
(
cxt2
);
hr
=
ITfDocumentMgr_GetTop
(
g_dm
,
&
cxtTest
);
hr
=
ITfDocumentMgr_GetTop
(
g_dm
,
&
cxtTest
);
ok
(
SUCCEEDED
(
hr
),
"GetTop Failed
\n
"
);
ok
(
SUCCEEDED
(
hr
),
"GetTop Failed
\n
"
);
ok
(
cxtTest
==
cxt
,
"Wrong context on top
\n
"
);
ok
(
cxtTest
==
cxt
,
"Wrong context on top
\n
"
);
...
@@ -1651,6 +1657,25 @@ static void test_startSession(void)
...
@@ -1651,6 +1657,25 @@ static void test_startSession(void)
ok
(
cxtTest
==
cxt
,
"Wrong context on base
\n
"
);
ok
(
cxtTest
==
cxt
,
"Wrong context on base
\n
"
);
ITfContext_Release
(
cxtTest
);
ITfContext_Release
(
cxtTest
);
hr
=
ITfDocumentMgr_CreateContext
(
g_dm
,
cid
,
0
,
(
IUnknown
*
)
ts
,
&
cxt2
,
&
editCookie
);
ok
(
hr
==
S_OK
,
"CreateContext Failed
\n
"
);
test_OnPushContext
=
SINK_EXPECTED
;
test_ACP_AdviseSink
=
SINK_EXPECTED
;
hr
=
ITfDocumentMgr_Push
(
g_dm
,
cxt2
);
ok
(
hr
==
S_OK
,
"Push Failed
\n
"
);
sink_check_ok
(
&
test_OnPushContext
,
"OnPushContext"
);
sink_check_ok
(
&
test_ACP_AdviseSink
,
"TextStoreACP_AdviseSink"
);
test_ACP_UnadviseSink
=
SINK_EXPECTED
;
cnt
=
check_context_refcount
(
cxt2
);
test_OnPopContext
=
SINK_EXPECTED
;
hr
=
ITfDocumentMgr_Pop
(
g_dm
,
0
);
ok
(
hr
==
S_OK
,
"Pop Failed
\n
"
);
ok
(
check_context_refcount
(
cxt2
)
<
cnt
,
"Ref count did not decrease
\n
"
);
sink_check_ok
(
&
test_OnPopContext
,
"OnPopContext"
);
sink_check_ok
(
&
test_ACP_UnadviseSink
,
"TextStoreACP_AdviseSink"
);
hr
=
ITfDocumentMgr_Pop
(
g_dm
,
0
);
hr
=
ITfDocumentMgr_Pop
(
g_dm
,
0
);
ok
(
FAILED
(
hr
),
"Pop Succeeded
\n
"
);
ok
(
FAILED
(
hr
),
"Pop Succeeded
\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