Qian Hong qhong@codeweavers.com writes:
+static void test_timers_exception(DWORD code) +{
- UINT_PTR id;
- MSG msg;
- exception = code;
- count = 0;
- id = SetTimer(NULL, 0, 300, callback_exception);
- ok(id != 0, "did not get id from SetTimer.\n");
- Sleep(150);
- while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
- ok(count == 0, "did not get zero count as expected (%i).\n", count);
- Sleep(200);
- while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
- ok(count == 1, "did not get one count as expected (%i).\n", count);
- KillTimer(NULL, id);
- Sleep(350);
- while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
- ok(count == 1, "killing timer did not work (%i).\n", count);
+}
You should find a way to test this without all these sleeps, the user32 tests already take a long time as it is.