Commit Graph

3058 Commits

Author SHA1 Message Date
Zebediah Figura 6e4d441ce1 user32/tests: Work around a failure on Windows < Vista.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-01 19:19:12 +01:00
Francois Gouget 74ec06bee9 user32/tests: Don't trace the test_topmost() window handles.
They change from one run to the next, causing the failures to always
look new. Also for the topmost failures the window handle is irrelevant:
all that matters is which window got the wrong results.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Zebediah Figura 3305f12844 user32/tests: Work around failures on Windows 10 version 1607.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:04 +01:00
Zebediah Figura 986bfcadd7 user32/tests: Get rid of some Windows 9x workarounds.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:02 +01:00
Zebediah Figura 7473db002e user32/tests: Remove unnecessary uses of CREATE_SUSPENDED.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:00 +01:00
Rémi Bernon 6c47355006 user32/tests: Return MA_ACTIVATE to WM_MOUSEACTIVATE on main test window.
This shows that one of test_SetWindowPos is broken on Wine, and needs
to be fixed. It was previously fixed by some change in DefWindowProcA,
introduced in 71d35d8940 but that was a
unexpected side effect.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:12:28 +01:00
Rémi Bernon f6d671c343 user32/tests: Move TEST_MOUSEACTIVATE to test_defwinproc.
This test is actually testing the reply from DefWindowProcA, as the
window it was sent to is not handling this particular message.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:12:22 +01:00
Zhiyi Zhang 59e52108d5 user32/tests: Mark some GetDeviceCaps() tests as todo on Wine.
GetDeviceCaps(hdc, DESKTOPHORZRES/DESKTOPVERTRES) on Windows reports
the primary desktop, but on Wine it reports the virtual screen.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-24 11:50:51 +01:00
Francois Gouget fe18edd6f8 user32: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:59:03 +01:00
Nikolay Sivov 832b748b06 user32/listbox: Update caret index on LB_SETSEL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47459
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Nikolay Sivov b37b3f00a6 user32/listbox: Scroll to specified caret index.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Francois Gouget cca965d94e user32/tests: Fix the spelling of an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget ba1aa24378 user32: Fix the spelling of a TRACE() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget 6ccd78e35f user32/tests: Avoid a couple of unneeded strlen() calls.
Note that DeviceString is an array field and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget 3b91403e41 user32/tests: Avoid an unneeded lstrlenA() call.
Note that ptr may be NULL (see ok() check a few lines up).

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget e248170e30 user32/tests: Avoid an unneeded (&commented out) strlen() call.
Note that pathBuffer is an array and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Alexandre Julliard aa82739331 user32: Forward string calls to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Zhiyi Zhang 11065839f5 user32/tests: Use a higher resolution in test_ChangeDisplaySettingsEx().
640x480 is not supported on some Windows 10 versions.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:35:06 +01:00
Zhiyi Zhang dbab697da8 user32/tests: Test cursor clip rectangles in per-monitor aware context.
So the tests don't fail in HiDPI environment.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:34:59 +01:00
Zhiyi Zhang 4fc651db92 user32/tests: Import functions if possible.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:34:40 +01:00
Derek Lesho 11ef39af39 users/tests: Test scan code prefix for MAPVK_VK_TO_VSC_EX.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
John Alway 35919eb6a1 user32/tests: Add a test for combo resizing from smaller item height.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:49 +01:00
Nikolay Sivov ad6a8d50e8 user32/combo: Force minimal item height.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:44 +01:00
Nikolay Sivov 722f4fc084 user32/combo: Remove redundant argument from border painting helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:40 +01:00
Nikolay Sivov 76ef090f3d user32/combo: Remove unnecessary argument from button painting helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:36 +01:00
Nikolay Sivov 14e074b2a4 user32/combo: Remove redundant argument from text height helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:33 +01:00
Nikolay Sivov 13d7cad9de user32/combo: Simplify child controls position update helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:33 +01:00
Nikolay Sivov b563ea018b user32/combo: Simplify rectangles sizing helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:32 +01:00
Francois Gouget c56116aa37 user32/test: Start the AdjustWindowRectExForDpi() from a known state.
rect and rect2 have been modified by the previous test by the time we
get to AdjustWindowRectExForDpi(). This makes interpreting the traces
harder in case of a failure. So reset them to the same starting state
as for the AdjustWindowRectEx() test.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 21:01:33 +01:00
Rémi Bernon fdfc602284 user32/tests: Add optional messages to test sequences.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon c1b8deeff0 user32/tests: Wait longer for injected mouse event to take effect.
Also rework the wait loop a bit, the delay was weird.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon 0779443518 user32/tests: Synchronize with other thread between SendMessage calls.
This sometimes fails on Windows because we check the queue status before
the other thread second call to SendMessage has been made (or received).

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon 19c107335e user32/tests: Make the test_PeekMessage3 timer fire less often.
On Windows it sometimes fires again before we get the expected WM_USER
message and/or before the end of the test where we don't expect any more
message. We cannot fire it only once because Wine doesn't pass the tests
yet and it would block otherwise, but fire it less often helps the test
to pass on Windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:58 +01:00
Rémi Bernon 1450924e59 user32/tests: Ignore WM_WININICHANGE message in test sequences.
Tests sometimes fail because of an unexpected 0x001a message.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:58 +01:00
Rémi Bernon 8134b8b6f5 user32/tests: Close event at the end of the test_WaitForInputIdle test.
There's some random timeout failures on Windows VMs in this test, this
is probably not going to fix them, but cleaning up is not going to hurt.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:44:41 +01:00
Rémi Bernon 41094ed5ba user32/tests: Synchronize with the SendMessageTimeout thread.
We wait a bit after starting the thread, but sometimes the test fails
because we didn't wait long enough. This synchronizes the Sleep and the
SendMessageTimeout calls.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:42:13 +01:00
Rémi Bernon 843cadb728 user32/tests: Tweak test result for w1064v1809.
Seems like the wparam is not always as expected.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:41:56 +01:00
Rémi Bernon b6f7c0a492 user32/tests: Increase test_timers count tolerance on Windows.
Sometimes the tests fail on w1064v1809 with count equals to 54, or 53.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:41:50 +01:00
Piotr Caban cfa9334125 user32: Include png.h only if SONAME_LIBPNG is defined.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 22:20:22 +01:00
Zhiyi Zhang b95c4c229c user32/tests: Fix monitor test failures on some systems.
On some systems, the monitor name may not be Default_Monitor,
so check format instead.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 15:20:56 +01:00
Zhiyi Zhang 6b2b004c0c user32/tests: Fix test failures on multiple monitor setup.
The desktop window rectangle is the same as that of primary monitor
for compatibility reasons. It equals to virtual screen rectangle only
when there are no more than two active and non-mirrored monitors.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 15:20:50 +01:00
Fabian Maurer 244268589e user32/edit: In EM_POSFROMCHAR return correct position for empty lines.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47305
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:09:51 +01:00
Rémi Bernon 766ee1692e user32/tests: Flush remaining events before starting a new sequence.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:43:13 +01:00
Rémi Bernon ad5ca21de6 user32/tests: Add optional flags for alternative sequence on w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:43:05 +01:00
Rémi Bernon e83486062d user32/tests: Skip tests expecting ascii VK wparam on non-us keyboards.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:50 +01:00
Rémi Bernon 32b3e502d9 user32/tests: Update SetActiveWindow(0) test result for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:44 +01:00
Rémi Bernon 37fe4b0bab user32/tests: Add some wparam mask to message sequences for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:33 +01:00
Huw Davies ae7531f673 user32: Remove unused GetAsyncKeyState() driver entry.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:04:03 +01:00
Rémi Bernon 9099b9843f user32/tests: Wait and flush messages after window creation.
The window created in the separate thread in test_Input_mouse sometimes
fails to catch the mouse input in time. Waiting and flushing the initial
messages seems to make the issue harder to reproduce.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:46:59 +01:00
Alistair Leslie-Hughes 71d35d8940 user32: WM_MOUSEACTIVATE should return MA_NOACTIVATE for WM_LBUTTONDOWN/HTCAPTION message.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47945
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:43:28 +01:00