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
fe2f8776
Commit
fe2f8776
authored
Jun 05, 2013
by
Sergey Guralnik
Committed by
Alexandre Julliard
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Test MDI child order changing caused by WM_MDINEXT.
parent
c34b7b13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
win.c
dlls/user32/tests/win.c
+74
-0
No files found.
dlls/user32/tests/win.c
View file @
fe2f8776
...
...
@@ -1507,6 +1507,69 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
DestroyWindow
(
mdi_child
);
}
static
void
test_MDI_child_stack
(
HWND
mdi_client
)
{
HWND
child_1
,
child_2
,
child_3
,
child_4
;
HWND
stack
[
4
];
MDICREATESTRUCTA
cs
;
cs
.
szClass
=
"MDI_child_Class_1"
;
cs
.
szTitle
=
"MDI child"
;
cs
.
hOwner
=
GetModuleHandleA
(
0
);
cs
.
x
=
CW_USEDEFAULT
;
cs
.
y
=
CW_USEDEFAULT
;
cs
.
cx
=
CW_USEDEFAULT
;
cs
.
cy
=
CW_USEDEFAULT
;
cs
.
style
=
0
;
cs
.
lParam
=
(
LPARAM
)
mdi_lParam_test_message
;
assert
(
child_1
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDICREATE
,
0
,
(
LPARAM
)
&
cs
));
assert
(
child_2
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDICREATE
,
0
,
(
LPARAM
)
&
cs
));
assert
(
child_3
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDICREATE
,
0
,
(
LPARAM
)
&
cs
));
assert
(
child_4
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDICREATE
,
0
,
(
LPARAM
)
&
cs
));
stack
[
0
]
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
stack
[
1
]
=
GetWindow
(
stack
[
0
],
GW_HWNDNEXT
);
stack
[
2
]
=
GetWindow
(
stack
[
1
],
GW_HWNDNEXT
);
stack
[
3
]
=
GetWindow
(
stack
[
2
],
GW_HWNDNEXT
);
trace
(
"Initial MDI child stack: %p->%p->%p->%p
\n
"
,
stack
[
0
],
stack
[
1
],
stack
[
2
],
stack
[
3
]);
ok
(
stack
[
0
]
==
child_4
&&
stack
[
1
]
==
child_3
&&
stack
[
2
]
==
child_2
&&
stack
[
3
]
==
child_1
,
"Unexpected initial order, should be: %p->%p->%p->%p
\n
"
,
child_4
,
child_3
,
child_2
,
child_1
);
trace
(
"Activate child next to %p
\n
"
,
child_3
);
SendMessage
(
mdi_client
,
WM_MDINEXT
,
(
WPARAM
)
child_3
,
0
);
stack
[
0
]
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
stack
[
1
]
=
GetWindow
(
stack
[
0
],
GW_HWNDNEXT
);
stack
[
2
]
=
GetWindow
(
stack
[
1
],
GW_HWNDNEXT
);
stack
[
3
]
=
GetWindow
(
stack
[
2
],
GW_HWNDNEXT
);
todo_wine
ok
(
stack
[
0
]
==
child_2
&&
stack
[
1
]
==
child_4
&&
stack
[
2
]
==
child_1
&&
stack
[
3
]
==
child_3
,
"Broken MDI child stack:
\n
expected: %p->%p->%p->%p, but got: %p->%p->%p->%p
\n
"
,
child_2
,
child_4
,
child_1
,
child_3
,
stack
[
0
],
stack
[
1
],
stack
[
2
],
stack
[
3
]);
trace
(
"Activate child previous to %p
\n
"
,
child_1
);
SendMessage
(
mdi_client
,
WM_MDINEXT
,
(
WPARAM
)
child_1
,
1
);
stack
[
0
]
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
stack
[
1
]
=
GetWindow
(
stack
[
0
],
GW_HWNDNEXT
);
stack
[
2
]
=
GetWindow
(
stack
[
1
],
GW_HWNDNEXT
);
stack
[
3
]
=
GetWindow
(
stack
[
2
],
GW_HWNDNEXT
);
todo_wine
ok
(
stack
[
0
]
==
child_4
&&
stack
[
1
]
==
child_2
&&
stack
[
2
]
==
child_1
&&
stack
[
3
]
==
child_3
,
"Broken MDI child stack:
\n
expected: %p->%p->%p->%p, but got: %p->%p->%p->%p
\n
"
,
child_4
,
child_2
,
child_1
,
child_3
,
stack
[
0
],
stack
[
1
],
stack
[
2
],
stack
[
3
]);
DestroyWindow
(
child_1
);
DestroyWindow
(
child_2
);
DestroyWindow
(
child_3
);
DestroyWindow
(
child_4
);
}
/**********************************************************************
* MDI_ChildGetMinMaxInfo (copied from windows/mdi.c)
*
...
...
@@ -1788,6 +1851,17 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
assert
(
mdi_client
);
test_MDI_create
(
hwnd
,
mdi_client
,
client_cs
.
idFirstChild
);
DestroyWindow
(
mdi_client
);
/* Test child window stack management */
mdi_client
=
CreateWindowExA
(
0
,
"mdiclient"
,
NULL
,
WS_CHILD
,
0
,
0
,
rc
.
right
,
rc
.
bottom
,
hwnd
,
0
,
GetModuleHandle
(
0
),
&
client_cs
);
assert
(
mdi_client
);
test_MDI_child_stack
(
mdi_client
);
DestroyWindow
(
mdi_client
);
break
;
}
...
...
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