New scroll test, help in figuring out Win9x (Was: Re: new failing tests)

Alex Villací­s Lasso a_villacis at palosanto.com
Tue Jun 24 12:28:16 CDT 2008


James Hawkins escribió:
> Hi Alex,
>
> The following commit introduces several windows test failures across
> the board in riched20:
>
> commit 0e9ed5c10e3ac6b253712037f0b30046a5656239
> Author: Alex Villacís Lasso <a_villacis at palosanto.com>
> Date:   Sun May 11 09:54:58 2008 -0500
>
>     richedit: Empty text should result in a scroll range of 0. Tests
> for this behavior.
>
> Please take a look at the test results and either fix the tests or
> send in a patch to remove them.
>
> http://test.winehq.org
>
> Thanks,
> James Hawkins
>   
I am trying to debug the cause of this. However, I have run into a 
strange problem.

The root cause of the failing tests is that GetScrollInfo() is failing 
when applied to the newly created richedit window. On Windows XP-SP2 it 
fails and sets GetLastError() to ERROR_NO_SCROLLBARS. On Win9x, it 
fails, but leaves the last error unset. To figure out the behavior of 
the richedit scrollbars, I decided to add a test for the standard 
scrollbars on a generic window, so that I have a standard to compare the 
richedit windows against.

The result of this is the attached patch. What I can deduce is the 
following: on window creation, the scrollbars are set to a range of 0 to 
100 with page 0 and position 0, but attempts to read such ranges will 
fail if the window lacks both the WS_VSCROLL and the WS_HSCROLL styles - 
until a range is explicitly assigned to either scrollbar, in which it 
suddenly becomes readable for both. As it stands, this test passes on 
WinXP-SP2 (but not in Wine). The problem is that, on Win9x only, it 
seems that the styles WS_VSCROLL and WS_HSCROLL are not being set even 
when requested in the CreateWindowExA(). The end result is that on Win9x 
(but not on WinXP-SP2), the following failure appears

Unexpected WS_HSCROLL style, found 0 expected 1

or

Unexpected WS_VSCROLL style, found 0 expected 1

I refuse to believe this to be a genuine difference between Win9x and 
WinXP-SP2, but I cannot figure out yet what I am doing wrong. Do you 
have any ideas?


-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: experimental-scroll-test.patch
Type: text/x-patch
Size: 11450 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080624/5a15fc82/attachment.bin 


More information about the wine-devel mailing list