Commit 0db3d3cd authored by Alexandre Julliard's avatar Alexandre Julliard

user32/tests: Fix a few more input test failures on Windows.

parent 2dc90652
...@@ -1168,7 +1168,7 @@ int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOI ...@@ -1168,7 +1168,7 @@ int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOI
return -1; return -1;
} }
if(!ptin || !ptout) { if(!ptin || (!ptout && count)) {
SetLastError(ERROR_NOACCESS); SetLastError(ERROR_NOACCESS);
return -1; return -1;
} }
......
...@@ -885,7 +885,7 @@ static void test_Input_blackbox(void) ...@@ -885,7 +885,7 @@ static void test_Input_blackbox(void)
pSendInput(1, (INPUT*)&i, sizeof(TEST_INPUT)); pSendInput(1, (INPUT*)&i, sizeof(TEST_INPUT));
empty_message_queue(); empty_message_queue();
GetKeyboardState(ks2); GetKeyboardState(ks2);
if (!ii && !sent_messages_cnt && !memcmp( ks1, ks2, sizeof(ks1) )) if (!ii && sent_messages_cnt <= 1 && !memcmp( ks1, ks2, sizeof(ks1) ))
{ {
win_skip( "window doesn't receive the queued input\n" ); win_skip( "window doesn't receive the queued input\n" );
break; break;
...@@ -913,7 +913,7 @@ static void test_keynames(void) ...@@ -913,7 +913,7 @@ static void test_keynames(void)
static POINT pt_old, pt_new; static POINT pt_old, pt_new;
static BOOL clipped; static BOOL clipped;
#define STEP 20 #define STEP 3
static LRESULT CALLBACK hook_proc1( int code, WPARAM wparam, LPARAM lparam ) static LRESULT CALLBACK hook_proc1( int code, WPARAM wparam, LPARAM lparam )
{ {
...@@ -1097,11 +1097,10 @@ static void test_GetMouseMovePointsEx(void) ...@@ -1097,11 +1097,10 @@ static void test_GetMouseMovePointsEx(void)
SetLastError(MYERROR); SetLastError(MYERROR);
count = 0; count = 0;
retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, count, GMMP_USE_DISPLAY_POINTS); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, count, GMMP_USE_DISPLAY_POINTS);
todo_wine { if (retval == -1)
ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval); ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
ok(MYERROR == GetLastError(), else
"expected error %d, got %u\n", MYERROR, GetLastError()); ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
}
/* test fourth parameter /* test fourth parameter
* a value higher than 64 is expected to fail with ERROR_INVALID_PARAMETER * a value higher than 64 is expected to fail with ERROR_INVALID_PARAMETER
...@@ -1116,20 +1115,18 @@ static void test_GetMouseMovePointsEx(void) ...@@ -1116,20 +1115,18 @@ static void test_GetMouseMovePointsEx(void)
SetLastError(MYERROR); SetLastError(MYERROR);
count = 0; count = 0;
retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS);
todo_wine { if (retval == -1)
ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval); ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
ok(MYERROR == GetLastError(), else
"expected error %d, got %u\n", MYERROR, GetLastError()); ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
}
SetLastError(MYERROR); SetLastError(MYERROR);
count = BUFLIM; count = BUFLIM;
retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS);
todo_wine { if (retval == -1)
ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval); ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
ok(MYERROR == GetLastError(), else
"expected error %d, got %u\n", MYERROR, GetLastError()); ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
}
SetLastError(MYERROR); SetLastError(MYERROR);
retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment