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
0522c01b
Commit
0522c01b
authored
Apr 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Test WM_IME_NOTIFY messages target window.
Showing that they aren't sent to the focused window but only to the INPUTCONTEXT hWnd member.
parent
8cb2d2d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
8 deletions
+53
-8
imm32.c
dlls/imm32/tests/imm32.c
+53
-8
No files found.
dlls/imm32/tests/imm32.c
View file @
0522c01b
...
...
@@ -2670,6 +2670,7 @@ done:
received
->
himc
,
received
->
message
.
msg
,
received
->
message
.
wparam
,
received
->
message
.
lparam
);
return
ret
;
case
MSG_TEST_WIN
:
todo_wine_if
(
expected
->
todo
)
ok_
(
file
,
line
)(
!
ret
,
"got hkl %p, himc %p, MSG_TEST_WIN msg %#x, wparam %#Ix, lparam %#Ix
\n
"
,
received
->
hkl
,
received
->
himc
,
received
->
message
.
msg
,
received
->
message
.
wparam
,
received
->
message
.
lparam
);
return
ret
;
...
...
@@ -2703,6 +2704,7 @@ done:
expected
->
himc
,
expected
->
message
.
msg
,
expected
->
message
.
wparam
,
expected
->
message
.
lparam
);
break
;
case
MSG_TEST_WIN
:
todo_wine_if
(
expected
->
todo
)
ok_
(
file
,
line
)(
!
ret
,
"hkl %p, himc %p, MSG_TEST_WIN msg %#x, wparam %#Ix, lparam %#Ix
\n
"
,
expected
->
hkl
,
expected
->
himc
,
expected
->
message
.
msg
,
expected
->
message
.
wparam
,
expected
->
message
.
lparam
);
break
;
...
...
@@ -2722,7 +2724,8 @@ static void ok_seq_( const char *file, int line, const struct ime_call *expected
winetest_push_context
(
"%u%s%s"
,
i
++
,
!
expected
->
func
?
" (spurious)"
:
""
,
!
received
->
func
?
" (missing)"
:
""
);
ret
=
ok_call_
(
file
,
line
,
expected
,
received
);
if
(
ret
&&
expected
->
todo
&&
!
strcmp
(
winetest_platform
,
"wine"
))
if
(
ret
&&
expected
->
todo
&&
expected
->
func
&&
!
strcmp
(
winetest_platform
,
"wine"
))
expected
++
;
else
if
(
ret
&&
broken
(
expected
->
broken
))
expected
++
;
...
...
@@ -4024,6 +4027,10 @@ static void test_ImmSetConversionStatus(void)
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETCONVERSIONMODE
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETCONVERSIONMODE
},
},
{
...
...
@@ -4032,6 +4039,10 @@ static void test_ImmSetConversionStatus(void)
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETSENTENCEMODE
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETSENTENCEMODE
},
},
{
0
},
...
...
@@ -4042,10 +4053,7 @@ static void test_ImmSetConversionStatus(void)
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0xdeadbeef
,
.
value
=
IMC_SETCONVERSIONMODE
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETCONVERSIONMODE
},
},
{.
todo
=
TRUE
},
/* spurious calls */
{
0
},
};
const
struct
ime_call
set_conversion_status_2_seq
[]
=
...
...
@@ -4056,6 +4064,10 @@ static void test_ImmSetConversionStatus(void)
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETCONVERSIONMODE
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETCONVERSIONMODE
},
},
{
...
...
@@ -4064,6 +4076,10 @@ static void test_ImmSetConversionStatus(void)
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETSENTENCEMODE
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETSENTENCEMODE
},
},
{
0
},
...
...
@@ -4080,7 +4096,7 @@ static void test_ImmSetConversionStatus(void)
ok_eq
(
old_conversion
,
ctx
->
fdwConversion
,
UINT
,
"%#x"
);
ok_eq
(
old_sentence
,
ctx
->
fdwSentence
,
UINT
,
"%#x"
);
hwnd
=
CreateWindowW
(
L"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
hwnd
=
CreateWindowW
(
test_class
.
lpszClassName
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
100
,
100
,
100
,
100
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
!!
hwnd
,
"CreateWindowW failed, error %lu
\n
"
,
GetLastError
()
);
process_messages
();
...
...
@@ -4134,6 +4150,7 @@ static void test_ImmSetConversionStatus(void)
ok_eq
(
0xdeadbeef
,
ctx
->
fdwConversion
,
UINT
,
"%#x"
);
ok_eq
(
0xfeedcafe
,
ctx
->
fdwSentence
,
UINT
,
"%#x"
);
ctx
->
hWnd
=
0
;
ok_seq
(
empty_sequence
);
ok_ret
(
1
,
ImmSetConversionStatus
(
default_himc
,
0
,
0xfeedcafe
)
);
ok_seq
(
set_conversion_status_1_seq
);
...
...
@@ -4144,6 +4161,7 @@ static void test_ImmSetConversionStatus(void)
ok_eq
(
0
,
ctx
->
fdwConversion
,
UINT
,
"%#x"
);
ok_eq
(
0xfeedcafe
,
ctx
->
fdwSentence
,
UINT
,
"%#x"
);
ctx
->
hWnd
=
hwnd
;
ok_seq
(
empty_sequence
);
ok_ret
(
1
,
ImmSetConversionStatus
(
default_himc
,
~
0
,
~
0
)
);
ok_seq
(
set_conversion_status_2_seq
);
...
...
@@ -4202,6 +4220,10 @@ static void test_ImmSetOpenStatus(void)
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETOPENSTATUS
},
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETOPENSTATUS
},
},
{
0
},
...
...
@@ -4213,6 +4235,20 @@ static void test_ImmSetOpenStatus(void)
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0
,
.
value
=
IMC_SETOPENSTATUS
},
.
todo
=
TRUE
,
},
{
0
},
};
const
struct
ime_call
set_open_status_2_seq
[]
=
{
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0
,
.
value
=
IMC_SETOPENSTATUS
},
.
todo
=
TRUE
,
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_TEST_WIN
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETOPENSTATUS
},
.
todo
=
TRUE
,
},
{
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
MSG_IME_UI
,
.
message
=
{.
msg
=
WM_IME_NOTIFY
,
.
wparam
=
IMN_SETOPENSTATUS
},
...
...
@@ -4231,7 +4267,7 @@ static void test_ImmSetOpenStatus(void)
ok_ne
(
NULL
,
ctx
,
INPUTCONTEXT
*
,
"%p"
);
ok_eq
(
old_status
,
ctx
->
fOpen
,
UINT
,
"%#x"
);
hwnd
=
CreateWindowW
(
L"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
hwnd
=
CreateWindowW
(
test_class
.
lpszClassName
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
100
,
100
,
100
,
100
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
!!
hwnd
,
"CreateWindowW failed, error %lu
\n
"
,
GetLastError
()
);
process_messages
();
...
...
@@ -4276,9 +4312,18 @@ static void test_ImmSetOpenStatus(void)
ok_eq
(
0xdeadbeef
,
status
,
UINT
,
"%#x"
);
ok_eq
(
0xdeadbeef
,
ctx
->
fOpen
,
UINT
,
"%#x"
);
ctx
->
hWnd
=
0
;
ok_ret
(
1
,
ImmSetOpenStatus
(
default_himc
,
0xfeedcafe
)
);
ok_seq
(
set_open_status_1_seq
);
status
=
ImmGetOpenStatus
(
default_himc
);
todo_wine
ok_eq
(
0xfeedcafe
,
status
,
UINT
,
"%#x"
);
todo_wine
ok_eq
(
0xfeedcafe
,
ctx
->
fOpen
,
UINT
,
"%#x"
);
ctx
->
hWnd
=
hwnd
;
ok_seq
(
empty_sequence
);
ok_ret
(
1
,
ImmSetOpenStatus
(
default_himc
,
~
0
)
);
ok_seq
(
set_open_status_
1
_seq
);
ok_seq
(
set_open_status_
2
_seq
);
status
=
ImmGetOpenStatus
(
default_himc
);
todo_wine
ok_eq
(
~
0
,
status
,
UINT
,
"%#x"
);
...
...
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