Author: fireball
Date: Tue May 23 23:55:45 2006
New Revision: 21991
URL:
http://svn.reactos.ru/svn/reactos?rev=21991&view=rev
Log:
- Update user32_winetest to Wine-23052006. Update includes changes in the following
subtests: edit, winstation. Evereything else is just compilation
Modified:
trunk/reactos/regtests/winetests/user32/edit.c
trunk/reactos/regtests/winetests/user32/input.c
trunk/reactos/regtests/winetests/user32/win.c
trunk/reactos/regtests/winetests/user32/winstation.c
Modified: trunk/reactos/regtests/winetests/user32/edit.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/winetests/user32/e…
==============================================================================
--- trunk/reactos/regtests/winetests/user32/edit.c (original)
+++ trunk/reactos/regtests/winetests/user32/edit.c Tue May 23 23:55:45 2006
@@ -20,6 +20,7 @@
#include <assert.h>
#include <windows.h>
+#include <windowsx.h>
#include <commctrl.h>
#include "wine/test.h"
@@ -277,9 +278,7 @@
static LRESULT CALLBACK ET2_WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg) {
- case WM_COMMAND:
- ET2_OnCommand(hwnd, LOWORD(wParam), (HWND)lParam, HIWORD(wParam));
- break;
+ HANDLE_MSG(hwnd, WM_COMMAND, ET2_OnCommand);
}
return DefWindowProc(hwnd, iMsg, wParam, lParam);
}
@@ -760,106 +759,8 @@
ok(new_rect.right == old_rect.right, "The right border of the rectangle has
changed\n");
ok(new_rect.top == old_rect.top, "The top border of the rectangle has
changed\n");
ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle has
changed\n");
-
+
DestroyWindow (hwEdit);
-}
-
-static INT CALLBACK find_font_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type,
LPARAM lParam)
-{
- return 0;
-}
-
-static void test_margins_font_change(void)
-{
- HWND hwEdit;
- DWORD margins, font_margins;
- LOGFONT lf;
- HFONT hfont, hfont2;
- HDC hdc = GetDC(0);
-
- if(EnumFontFamiliesA(hdc, "Arial", find_font_proc, 0))
- {
- trace("Arial not found - skipping font change margin tests\n");
- ReleaseDC(0, hdc);
- return;
- }
- ReleaseDC(0, hdc);
-
- hwEdit = create_child_editcontrol(0, 0);
-
- SetWindowPos(hwEdit, NULL, 10, 10, 1000, 100, SWP_NOZORDER | SWP_NOACTIVATE);
-
- memset(&lf, 0, sizeof(lf));
- strcpy(lf.lfFaceName, "Arial");
- lf.lfHeight = 16;
- lf.lfCharSet = DEFAULT_CHARSET;
- hfont = CreateFontIndirectA(&lf);
- lf.lfHeight = 30;
- hfont2 = CreateFontIndirectA(&lf);
-
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- font_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(font_margins) != 0, "got %d\n", LOWORD(font_margins));
- ok(HIWORD(font_margins) != 0, "got %d\n", HIWORD(font_margins));
-
- /* With 'small' edit controls, test that the margin doesn't get set */
- SetWindowPos(hwEdit, NULL, 10, 10, 16, 100, SWP_NOZORDER | SWP_NOACTIVATE);
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0,0));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == 0, "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == 0, "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == 1, "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == 0, "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,1));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == 1, "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == 1, "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN,
MAKELONG(EC_USEFONTINFO,EC_USEFONTINFO));
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == 1, "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == 1, "got %d\n", HIWORD(margins));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont2, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == 1, "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == 1, "got %d\n", HIWORD(margins));
-
- /* Above a certain size threshold then the margin is updated */
- SetWindowPos(hwEdit, NULL, 10, 10, 1000, 100, SWP_NOZORDER | SWP_NOACTIVATE);
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,1));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN,
MAKELONG(EC_USEFONTINFO,EC_USEFONTINFO));
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins));
- SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont2, 0);
- margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
- ok(LOWORD(margins) != LOWORD(font_margins), "got %d\n", LOWORD(margins));
- ok(HIWORD(margins) != HIWORD(font_margins), "got %d\n", HIWORD(margins));
-
- SendMessageA(hwEdit, WM_SETFONT, 0, 0);
-
- DeleteObject(hfont2);
- DeleteObject(hfont);
- destroy_child_editcontrol(hwEdit);
-
}
#define edit_pos_ok(exp, got, txt) \
@@ -1066,8 +967,7 @@
test_edit_control_4();
test_edit_control_5();
test_margins();
- test_margins_font_change();
test_text_position();
-
+
UnregisterWindowClasses();
}
Modified: trunk/reactos/regtests/winetests/user32/input.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/winetests/user32/i…
==============================================================================
--- trunk/reactos/regtests/winetests/user32/input.c (original)
+++ trunk/reactos/regtests/winetests/user32/input.c Tue May 23 23:55:45 2006
@@ -49,7 +49,7 @@
#include <stdarg.h>
#include <assert.h>
-#include "windows.h"
+#include "windef.h"
#include "wine/test.h"
Modified: trunk/reactos/regtests/winetests/user32/win.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/winetests/user32/w…
==============================================================================
--- trunk/reactos/regtests/winetests/user32/win.c (original)
+++ trunk/reactos/regtests/winetests/user32/win.c Tue May 23 23:55:45 2006
@@ -2316,7 +2316,6 @@
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
- flush_events();
ok(GetActiveWindow() == hwnd, "wrong active window %p\n",
GetActiveWindow());
Modified: trunk/reactos/regtests/winetests/user32/winstation.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/regtests/winetests/user32/w…
==============================================================================
--- trunk/reactos/regtests/winetests/user32/winstation.c (original)
+++ trunk/reactos/regtests/winetests/user32/winstation.c Tue May 23 23:55:45 2006
@@ -42,29 +42,12 @@
trace( "obj %p type '%s'\n", obj, buffer );
}
-static void register_class(void)
-{
- WNDCLASSA cls;
-
- cls.style = CS_DBLCLKS;
- cls.lpfnWndProc = DefWindowProcA;
- cls.cbClsExtra = 0;
- cls.cbWndExtra = 0;
- cls.hInstance = GetModuleHandleA(0);
- cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
- cls.hbrBackground = GetStockObject(WHITE_BRUSH);
- cls.lpszMenuName = NULL;
- cls.lpszClassName = "WinStationClass";
- RegisterClassA(&cls);
-}
-
static HDESK initial_desktop;
static DWORD CALLBACK thread( LPVOID arg )
{
HDESK d1, d2;
- HWND hwnd =
CreateWindowExA(0,"WinStationClass","test",WS_POPUP,0,0,100,100,GetDesktopWindow(),0,0,0);
+ HWND hwnd =
CreateWindowExA(0,"BUTTON","test",WS_POPUP,0,0,100,100,GetDesktopWindow(),0,0,0);
ok( hwnd != 0, "CreateWindow failed\n" );
d1 = GetThreadDesktop(GetCurrentThreadId());
trace( "thread %p desktop: %p\n", arg, d1 );
@@ -106,8 +89,6 @@
HDESK d1, d2, d3;
HANDLE hthread;
DWORD id, flags;
- ATOM atom;
- char buffer[20];
/* win stations */
@@ -162,28 +143,6 @@
w3 = OpenWindowStation("foobar", TRUE, WINSTA_ALL_ACCESS );
ok( !w3, "open foobar station succeeded\n" );
-
- w2 = CreateWindowStation("foobar1", 0, WINSTA_ALL_ACCESS, NULL );
- ok( w2 != 0, "create foobar station failed\n" );
- w3 = CreateWindowStation("foobar2", 0, WINSTA_ALL_ACCESS, NULL );
- ok( w3 != 0, "create foobar station failed\n" );
- ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n"
);
- ok( GetHandleInformation( w3, &flags ), "GetHandleInformation failed\n"
);
-
- SetProcessWindowStation( w2 );
- register_class();
- atom = GlobalAddAtomA("foo");
- ok( GlobalGetAtomNameA( atom, buffer, sizeof(buffer) ) == 3, "GlobalGetAtomName
failed\n" );
- ok( !lstrcmpiA( buffer, "foo" ), "bad atom value %s\n", buffer
);
-
- ok( !CloseWindowStation( w2 ), "CloseWindowStation succeeded\n" );
- ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n"
);
-
- SetProcessWindowStation( w3 );
- ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n"
);
- ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
- ok( GlobalGetAtomNameA( atom, buffer, sizeof(buffer) ) == 3, "GlobalGetAtomName
failed\n" );
- ok( !lstrcmpiA( buffer, "foo" ), "bad atom value %s\n", buffer
);
/* desktops */
d1 = GetThreadDesktop(GetCurrentThreadId());