Commit cf111610 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/test: Fix the timer queue tests on Vista.

parent 28c411b6
...@@ -658,8 +658,7 @@ static void test_timer_queue(void) ...@@ -658,8 +658,7 @@ static void test_timer_queue(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDeleteTimerQueueEx(q, NULL); ret = pDeleteTimerQueueEx(q, NULL);
ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING,
ok(GetLastError() == ERROR_IO_PENDING,
"DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n",
GetLastError()); GetLastError());
...@@ -771,8 +770,7 @@ static void test_timer_queue(void) ...@@ -771,8 +770,7 @@ static void test_timer_queue(void)
even if the timer is finished. */ even if the timer is finished. */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDeleteTimerQueueTimer(q, t1, NULL); ret = pDeleteTimerQueueTimer(q, t1, NULL);
ok(!ret, "DeleteTimerQueueTimer call was expected to fail\n"); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING,
ok(GetLastError() == ERROR_IO_PENDING,
"DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n",
GetLastError()); GetLastError());
...@@ -803,8 +801,7 @@ static void test_timer_queue(void) ...@@ -803,8 +801,7 @@ static void test_timer_queue(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDeleteTimerQueueEx(q, e); ret = pDeleteTimerQueueEx(q, e);
ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING,
ok(GetLastError() == ERROR_IO_PENDING,
"DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n",
GetLastError()); GetLastError());
ok(WaitForSingleObject(e, 250) == WAIT_OBJECT_0, ok(WaitForSingleObject(e, 250) == WAIT_OBJECT_0,
...@@ -854,7 +851,7 @@ static void test_timer_queue(void) ...@@ -854,7 +851,7 @@ static void test_timer_queue(void)
ok(ret, "CreateTimerQueueTimer\n"); ok(ret, "CreateTimerQueueTimer\n");
ok(t4 != NULL, "CreateTimerQueueTimer\n"); ok(t4 != NULL, "CreateTimerQueueTimer\n");
Sleep(200); Sleep(500);
ret = pDeleteTimerQueueEx(q, INVALID_HANDLE_VALUE); ret = pDeleteTimerQueueEx(q, INVALID_HANDLE_VALUE);
ok(ret, "DeleteTimerQueueEx\n"); ok(ret, "DeleteTimerQueueEx\n");
...@@ -881,8 +878,7 @@ static void test_timer_queue(void) ...@@ -881,8 +878,7 @@ static void test_timer_queue(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDeleteTimerQueueEx(q, NULL); ret = pDeleteTimerQueueEx(q, NULL);
ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING,
ok(GetLastError() == ERROR_IO_PENDING,
"DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n",
GetLastError()); GetLastError());
ok(d1.num_calls == 1, "DeleteTimerQueueTimer\n"); ok(d1.num_calls == 1, "DeleteTimerQueueTimer\n");
...@@ -941,8 +937,7 @@ static void test_timer_queue(void) ...@@ -941,8 +937,7 @@ static void test_timer_queue(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pDeleteTimerQueueEx(q, NULL); ret = pDeleteTimerQueueEx(q, NULL);
ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING,
ok(GetLastError() == ERROR_IO_PENDING,
"DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n",
GetLastError()); GetLastError());
} }
......
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