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
462d5ca2
Commit
462d5ca2
authored
Mar 25, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32/tests: Test ActivateKeyboardLayout with an existing window.
parent
c2c27e79
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
imm32.c
dlls/imm32/tests/imm32.c
+38
-0
No files found.
dlls/imm32/tests/imm32.c
View file @
462d5ca2
...
...
@@ -3869,6 +3869,44 @@ static void test_ImmActivateLayout(void)
CHECK_CALLED
(
ImeDestroy
);
ok_seq
(
empty_sequence
);
/* when there's a window, ActivateKeyboardLayout calls ImeInquire */
if
(
!
(
hkl
=
ime_install
()))
goto
cleanup
;
hwnd
=
CreateWindowW
(
L"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
100
,
100
,
100
,
100
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
!!
hwnd
,
"CreateWindowW failed, error %lu
\n
"
,
GetLastError
()
);
ok_seq
(
empty_sequence
);
SET_EXPECT
(
ImeInquire
);
ok_eq
(
old_hkl
,
ActivateKeyboardLayout
(
hkl
,
0
),
HKL
,
"%p"
);
todo_wine
CHECK_CALLED
(
ImeInquire
);
ok_seq
(
activate_seq
);
ok_eq
(
hkl
,
GetKeyboardLayout
(
0
),
HKL
,
"%p"
);
ok_eq
(
hkl
,
ActivateKeyboardLayout
(
old_hkl
,
0
),
HKL
,
"%p"
);
ok_seq
(
deactivate_seq
);
ok_eq
(
old_hkl
,
GetKeyboardLayout
(
0
),
HKL
,
"%p"
);
ime_cleanup
(
hkl
);
ok_seq
(
empty_sequence
);
/* ImmActivateLayout leaks the IME, we need to free it manually */
SET_EXPECT
(
ImeDestroy
);
ret
=
ImmFreeLayout
(
hkl
);
ok
(
ret
,
"ImmFreeLayout returned %u
\n
"
,
ret
);
todo_wine
CHECK_CALLED
(
ImeDestroy
);
ok_seq
(
empty_sequence
);
ok_ret
(
1
,
DestroyWindow
(
hwnd
)
);
cleanup:
SET_ENABLE
(
ImeInquire
,
FALSE
);
SET_ENABLE
(
ImeDestroy
,
FALSE
);
...
...
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