зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1368033 - Ignore return value of SetCursorPos in TestDllInterceptor. r=dmajor
It's unclear why SetCursorPos is occasionally failing in automation but it sometimes returns FALSE so we ignore its return value in TestDllInterceptor. The majority of the value of these tests is simply in the execution of the method so the return value wasn't providing much anyway. --HG-- extra : rebase_source : e6852c2cc10fec878ef7711ab9b4302a80c9655b
This commit is contained in:
Родитель
544adcccd0
Коммит
1c495d8974
|
@ -399,16 +399,13 @@ bool TestProcessCaretEvents(void* aFunc)
|
|||
|
||||
bool TestSetCursorPos(void* aFunc)
|
||||
{
|
||||
// SetCursorPos has some issues in automation -- see bug 1368033.
|
||||
// For that reason, we don't check the return value -- we only
|
||||
// check that the method runs without producing an exception.
|
||||
auto patchedSetCursorPos =
|
||||
reinterpret_cast<decltype(&SetCursorPos)>(aFunc);
|
||||
POINT cursorPos;
|
||||
BOOL ok = GetCursorPos(&cursorPos);
|
||||
if (ok) {
|
||||
ok = patchedSetCursorPos(cursorPos.x, cursorPos.y);
|
||||
} else {
|
||||
ok = patchedSetCursorPos(512, 512);
|
||||
}
|
||||
return ok;
|
||||
patchedSetCursorPos(512, 512);
|
||||
return true;
|
||||
}
|
||||
|
||||
static DWORD sTlsIndex = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче