user32/tests: Fix test failures on Win9x/WinME.
This commit is contained in:
parent
619b3896ec
commit
334efcde13
@ -222,25 +222,27 @@ static void scrollbar_test_default( DWORD style)
|
|||||||
|
|
||||||
ret = GetScrollRange( hwnd, SB_VERT, &min, &max);
|
ret = GetScrollRange( hwnd, SB_VERT, &min, &max);
|
||||||
ok( ret ||
|
ok( ret ||
|
||||||
broken( !ret) /* Win 98/ME */ , "GetScrollRange failed.\n");
|
broken( !ret) /* Win 9x/ME */ , "GetScrollRange failed.\n");
|
||||||
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
|
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
|
||||||
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
|
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
|
||||||
ok( min == 0 && max == 0,
|
ok( min == 0 && max == 0,
|
||||||
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
|
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
|
||||||
else
|
else
|
||||||
todo_wine
|
todo_wine
|
||||||
ok( min == 0 && max == 100,
|
ok(( min == 0 && max == 100) ||
|
||||||
|
broken( min == 0 && max == 0), /* Win 9x/ME */
|
||||||
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
|
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
|
||||||
ret = GetScrollRange( hwnd, SB_HORZ, &min, &max);
|
ret = GetScrollRange( hwnd, SB_HORZ, &min, &max);
|
||||||
ok( ret ||
|
ok( ret ||
|
||||||
broken( !ret) /* Win 98/ME */ , "GetScrollRange failed.\n");
|
broken( !ret) /* Win 9x/ME */ , "GetScrollRange failed.\n");
|
||||||
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
|
/* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */
|
||||||
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
|
if( !( style & ( WS_VSCROLL | WS_HSCROLL)))
|
||||||
ok( min == 0 && max == 0,
|
ok( min == 0 && max == 0,
|
||||||
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
|
"Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style);
|
||||||
else
|
else
|
||||||
todo_wine
|
todo_wine
|
||||||
ok( min == 0 && max == 100,
|
ok(( min == 0 && max == 100) ||
|
||||||
|
broken( min == 0 && max == 0), /* Win 9x/ME */
|
||||||
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
|
"Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style);
|
||||||
/* test GetScrollInfo, vist for vertical SB */
|
/* test GetScrollInfo, vist for vertical SB */
|
||||||
ret = GetScrollInfo( hwnd, SB_VERT, &si);
|
ret = GetScrollInfo( hwnd, SB_VERT, &si);
|
||||||
@ -249,7 +251,9 @@ todo_wine
|
|||||||
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
||||||
else
|
else
|
||||||
todo_wine
|
todo_wine
|
||||||
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
ok( ret ||
|
||||||
|
broken( !ret), /* Win 9x/ME */
|
||||||
|
"GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
||||||
/* Same for Horizontal SB */
|
/* Same for Horizontal SB */
|
||||||
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
|
ret = GetScrollInfo( hwnd, SB_HORZ, &si);
|
||||||
/* should fail if no H orV scroll bar styles are present. Succeed otherwise */
|
/* should fail if no H orV scroll bar styles are present. Succeed otherwise */
|
||||||
@ -257,7 +261,9 @@ todo_wine
|
|||||||
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
||||||
else
|
else
|
||||||
todo_wine
|
todo_wine
|
||||||
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
ok( ret ||
|
||||||
|
broken( !ret), /* Win 9x/ME */
|
||||||
|
"GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
||||||
/* now set the Vertical Scroll range to something that could be the default value it
|
/* now set the Vertical Scroll range to something that could be the default value it
|
||||||
* already has */;
|
* already has */;
|
||||||
ret = SetScrollRange( hwnd, SB_VERT, 0, 100, FALSE);
|
ret = SetScrollRange( hwnd, SB_VERT, 0, 100, FALSE);
|
||||||
@ -276,7 +282,7 @@ todo_wine
|
|||||||
/* should succeed in ALL cases */
|
/* should succeed in ALL cases */
|
||||||
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
||||||
/* report the windows style */
|
/* report the windows style */
|
||||||
winstyle = GetWindowLongW( hwnd, GWL_STYLE );
|
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
|
||||||
/* WS_VSCROLL added to the window style */
|
/* WS_VSCROLL added to the window style */
|
||||||
if( !(style & WS_VSCROLL))
|
if( !(style & WS_VSCROLL))
|
||||||
{
|
{
|
||||||
@ -286,7 +292,8 @@ todo_wine
|
|||||||
"unexpected style change %8lx expected %8lx\n",
|
"unexpected style change %8lx expected %8lx\n",
|
||||||
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_VSCROLL);
|
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_VSCROLL);
|
||||||
else
|
else
|
||||||
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
|
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style ||
|
||||||
|
broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */
|
||||||
"unexpected style change %8lx expected %8x\n",
|
"unexpected style change %8lx expected %8x\n",
|
||||||
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
|
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
|
||||||
}
|
}
|
||||||
@ -314,7 +321,7 @@ todo_wine
|
|||||||
/* should succeed in ALL cases */
|
/* should succeed in ALL cases */
|
||||||
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style);
|
||||||
/* report the windows style */
|
/* report the windows style */
|
||||||
winstyle = GetWindowLongW( hwnd, GWL_STYLE );
|
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
|
||||||
/* WS_HSCROLL added to the window style */
|
/* WS_HSCROLL added to the window style */
|
||||||
if( !(style & WS_HSCROLL))
|
if( !(style & WS_HSCROLL))
|
||||||
{
|
{
|
||||||
@ -324,7 +331,8 @@ todo_wine
|
|||||||
"unexpected style change %8lx expected %8lx\n",
|
"unexpected style change %8lx expected %8lx\n",
|
||||||
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_HSCROLL);
|
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_HSCROLL);
|
||||||
else
|
else
|
||||||
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
|
ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style ||
|
||||||
|
broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */
|
||||||
"unexpected style change %8lx expected %8x\n",
|
"unexpected style change %8lx expected %8x\n",
|
||||||
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
|
(winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
|
||||||
}
|
}
|
||||||
@ -372,7 +380,7 @@ todo_wine
|
|||||||
/* should fail */
|
/* should fail */
|
||||||
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style);
|
||||||
/* add scroll styles */
|
/* add scroll styles */
|
||||||
winstyle = GetWindowLongW( hwnd, GWL_STYLE );
|
winstyle = GetWindowLongA( hwnd, GWL_STYLE );
|
||||||
SetWindowLongW( hwnd, GWL_STYLE, winstyle | WS_VSCROLL | WS_HSCROLL);
|
SetWindowLongW( hwnd, GWL_STYLE, winstyle | WS_VSCROLL | WS_HSCROLL);
|
||||||
ret = GetScrollInfo( hwnd, SB_VERT, &si);
|
ret = GetScrollInfo( hwnd, SB_VERT, &si);
|
||||||
/* should still fail */
|
/* should still fail */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user