Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
15602032
Commit
15602032
authored
Mar 27, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Mar 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Make an edit test more readable.
parent
06d429d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
edit.c
dlls/user32/tests/edit.c
+13
-10
resource.rc
dlls/user32/tests/resource.rc
+2
-2
No files found.
dlls/user32/tests/edit.c
View file @
15602032
...
@@ -37,23 +37,24 @@ struct edit_notify {
...
@@ -37,23 +37,24 @@ struct edit_notify {
static
struct
edit_notify
notifications
;
static
struct
edit_notify
notifications
;
static
INT_PTR
CALLBACK
bug_11841
_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
static
INT_PTR
CALLBACK
edit_dialog
_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
{
switch
(
msg
)
switch
(
msg
)
{
{
case
WM_INITDIALOG
:
case
WM_INITDIALOG
:
{
{
SetFocus
(
GetDlgItem
(
hdlg
,
1000
));
HWND
hedit
=
GetDlgItem
(
hdlg
,
1000
);
SetFocus
(
hedit
);
switch
(
lparam
)
switch
(
lparam
)
{
{
case
0
:
case
0
:
PostMessage
(
GetDlgItem
(
hdlg
,
1000
),
WM_KEYDOWN
,
0x1b
,
0x10001
);
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
break
;
break
;
case
1
:
case
1
:
PostMessage
(
GetDlgItem
(
hdlg
,
1000
),
WM_KEYDOWN
,
0xd
,
0x1c0001
);
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
break
;
break
;
case
2
:
case
2
:
PostMessage
(
GetDlgItem
(
hdlg
,
1000
),
WM_KEYDOWN
,
0x9
,
0xf0001
);
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_TAB
,
0xf0001
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0xdeadbeef
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0xdeadbeef
);
break
;
break
;
default:
default:
...
@@ -1198,14 +1199,16 @@ static void test_undo(void)
...
@@ -1198,14 +1199,16 @@ static void test_undo(void)
DestroyWindow
(
hwEdit
);
DestroyWindow
(
hwEdit
);
}
}
static
void
test_
bug_11841
(
void
)
static
void
test_
edit_dialog
(
void
)
{
{
int
r
;
int
r
;
r
=
DialogBoxParam
(
hinst
,
"BUG_11841_DIALOG"
,
NULL
,
(
DLGPROC
)
bug_11841_proc
,
0
);
/* from bug 11841 */
r
=
DialogBoxParam
(
hinst
,
"EDIT_READONLY_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_dialog_proc
,
0
);
ok
(
333
==
r
,
"Expected %d, got %d
\n
"
,
333
,
r
);
ok
(
333
==
r
,
"Expected %d, got %d
\n
"
,
333
,
r
);
r
=
DialogBoxParam
(
hinst
,
"
BUG_11841_DIALOG"
,
NULL
,
(
DLGPROC
)
bug_11841
_proc
,
1
);
r
=
DialogBoxParam
(
hinst
,
"
EDIT_READONLY_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_dialog
_proc
,
1
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"
BUG_11841_DIALOG"
,
NULL
,
(
DLGPROC
)
bug_11841
_proc
,
2
);
r
=
DialogBoxParam
(
hinst
,
"
EDIT_READONLY_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_dialog
_proc
,
2
);
ok
(
444
==
r
,
"Expected %d, got %d
\n
"
,
444
,
r
);
ok
(
444
==
r
,
"Expected %d, got %d
\n
"
,
444
,
r
);
}
}
...
@@ -1277,7 +1280,7 @@ START_TEST(edit)
...
@@ -1277,7 +1280,7 @@ START_TEST(edit)
test_text_position
();
test_text_position
();
test_espassword
();
test_espassword
();
test_undo
();
test_undo
();
test_
bug_11841
();
test_
edit_dialog
();
UnregisterWindowClasses
();
UnregisterWindowClasses
();
}
}
dlls/user32/tests/resource.rc
View file @
15602032
...
@@ -98,9 +98,9 @@ BEGIN
...
@@ -98,9 +98,9 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
END
BUG_11841
_DIALOG DIALOG DISCARDABLE 0, 0, 160, 80
EDIT_READONLY
_DIALOG DIALOG DISCARDABLE 0, 0, 160, 80
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "
Bug 11841
Test"
CAPTION "
Edit Readonly
Test"
FONT 8, "MS Shell Dlg"
FONT 8, "MS Shell Dlg"
{
{
PUSHBUTTON "Ok", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "Ok", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment