user32: Allow a NULL foreground window in the tests
James Hawkins
truiken at gmail.com
Tue Jun 10 19:15:07 CDT 2008
On Thu, May 29, 2008 at 8:24 PM, Dmitry Timoshkov
<dmitry at codeweavers.com> wrote:
> "James Hawkins" <truiken at gmail.com> wrote:
>
>> Passing 0 for the foreground window essentially disables the test,
>> whereas allowing a NULL window is testing another variation of what
>> can happen with the foreground window, just like if a last error is,
>> e.g., ERROR_FILE_NOT_FOUND on one platform instead of
>> ERROR_PATH_NOT_FOUND. Your method disables the test completely.
>
> Yes, passing foreground == 0 disables the foreground window test. That
> should be done very carefully for the tests that always fail. I'd expect
> for instance test_SetActiveWindow() and test_SetForegroundWindow() not
> need to disable it.
>
I've debugged this a bit more, and when running the user32:win test
within the winetest.exe program, all checked calls to
GetForegroundWindow return NULL. When running the user32:win test by
itself from the command line, only 7 tests fail the
GetForegroundWindow call (compared to 40). This makes me wonder about
the behavior of GetForegroundWindow in a child process window, but I'm
not really sure where to go from here.
--
James Hawkins
More information about the wine-devel
mailing list