Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7c8ce6c6
Commit
7c8ce6c6
authored
May 23, 2011
by
André Hentschel
Committed by
Alexandre Julliard
May 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for FlashWindowEx.
parent
b426a9a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
0 deletions
+93
-0
win.c
dlls/user32/tests/win.c
+93
-0
No files found.
dlls/user32/tests/win.c
View file @
7c8ce6c6
...
...
@@ -56,6 +56,7 @@ static int (WINAPI *pGetWindowRgnBox)(HWND,LPRECT);
static
BOOL
(
WINAPI
*
pGetGUIThreadInfo
)(
DWORD
,
GUITHREADINFO
*
);
static
BOOL
(
WINAPI
*
pGetProcessDefaultLayout
)(
DWORD
*
layout
);
static
BOOL
(
WINAPI
*
pSetProcessDefaultLayout
)(
DWORD
layout
);
static
BOOL
(
WINAPI
*
pFlashWindowEx
)(
PFLASHWINFO
pfwi
);
static
DWORD
(
WINAPI
*
pSetLayout
)(
HDC
hdc
,
DWORD
layout
);
static
DWORD
(
WINAPI
*
pGetLayout
)(
HDC
hdc
);
static
BOOL
(
WINAPI
*
pMirrorRgn
)(
HWND
hwnd
,
HRGN
hrgn
);
...
...
@@ -6446,6 +6447,96 @@ static void test_rtl_layout(void)
DestroyWindow
(
parent
);
}
static
void
test_FlashWindowEx
(
void
)
{
HWND
hwnd
;
FLASHWINFO
finfo
;
BOOL
ret
;
if
(
!
pFlashWindowEx
)
{
win_skip
(
"FlashWindowEx not supported
\n
"
);
return
;
}
hwnd
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
"FlashWindow"
,
WS_POPUP
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"CreateWindowExA error %d
\n
"
,
GetLastError
()
);
finfo
.
cbSize
=
sizeof
(
FLASHWINFO
);
finfo
.
dwFlags
=
FLASHW_TIMER
;
finfo
.
uCount
=
3
;
finfo
.
dwTimeout
=
200
;
finfo
.
hwnd
=
NULL
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"FlashWindowEx returned with %d
\n
"
,
GetLastError
());
finfo
.
hwnd
=
hwnd
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_NOACCESS
,
"FlashWindowEx returned with %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
,
"FlashWindowEx succeeded
\n
"
);
finfo
.
cbSize
=
sizeof
(
FLASHWINFO
)
-
1
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"FlashWindowEx succeeded
\n
"
);
finfo
.
cbSize
=
sizeof
(
FLASHWINFO
)
+
1
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"FlashWindowEx succeeded
\n
"
);
finfo
.
cbSize
=
sizeof
(
FLASHWINFO
);
DestroyWindow
(
hwnd
);
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"FlashWindowEx returned with %d
\n
"
,
GetLastError
());
ok
(
finfo
.
cbSize
==
sizeof
(
FLASHWINFO
),
"FlashWindowEx modified cdSize to %x
\n
"
,
finfo
.
cbSize
);
ok
(
finfo
.
hwnd
==
hwnd
,
"FlashWindowEx modified hwnd to %p
\n
"
,
finfo
.
hwnd
);
ok
(
finfo
.
dwFlags
==
FLASHW_TIMER
,
"FlashWindowEx modified dwFlags to %x
\n
"
,
finfo
.
dwFlags
);
ok
(
finfo
.
uCount
==
3
,
"FlashWindowEx modified uCount to %x
\n
"
,
finfo
.
uCount
);
ok
(
finfo
.
dwTimeout
==
200
,
"FlashWindowEx modified dwTimeout to %x
\n
"
,
finfo
.
dwTimeout
);
hwnd
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
"FlashWindow"
,
WS_VISIBLE
|
WS_POPUPWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"CreateWindowExA error %d
\n
"
,
GetLastError
()
);
finfo
.
hwnd
=
hwnd
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
NULL
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_NOACCESS
,
"FlashWindowEx returned with %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
todo_wine
ok
(
!
ret
,
"FlashWindowEx succeeded
\n
"
);
ok
(
finfo
.
cbSize
==
sizeof
(
FLASHWINFO
),
"FlashWindowEx modified cdSize to %x
\n
"
,
finfo
.
cbSize
);
ok
(
finfo
.
hwnd
==
hwnd
,
"FlashWindowEx modified hwnd to %p
\n
"
,
finfo
.
hwnd
);
ok
(
finfo
.
dwFlags
==
FLASHW_TIMER
,
"FlashWindowEx modified dwFlags to %x
\n
"
,
finfo
.
dwFlags
);
ok
(
finfo
.
uCount
==
3
,
"FlashWindowEx modified uCount to %x
\n
"
,
finfo
.
uCount
);
ok
(
finfo
.
dwTimeout
==
200
,
"FlashWindowEx modified dwTimeout to %x
\n
"
,
finfo
.
dwTimeout
);
finfo
.
dwFlags
=
FLASHW_STOP
;
SetLastError
(
0xdeadbeef
);
ret
=
pFlashWindowEx
(
&
finfo
);
ok
(
ret
,
"FlashWindowEx failed with %d
\n
"
,
GetLastError
());
DestroyWindow
(
hwnd
);
}
static
void
test_FindWindowEx
(
void
)
{
HWND
hwnd
,
found
;
...
...
@@ -6518,6 +6609,7 @@ START_TEST(win)
pGetGUIThreadInfo
=
(
void
*
)
GetProcAddress
(
user32
,
"GetGUIThreadInfo"
);
pGetProcessDefaultLayout
=
(
void
*
)
GetProcAddress
(
user32
,
"GetProcessDefaultLayout"
);
pSetProcessDefaultLayout
=
(
void
*
)
GetProcAddress
(
user32
,
"SetProcessDefaultLayout"
);
pFlashWindowEx
=
(
void
*
)
GetProcAddress
(
user32
,
"FlashWindowEx"
);
pGetLayout
=
(
void
*
)
GetProcAddress
(
gdi32
,
"GetLayout"
);
pSetLayout
=
(
void
*
)
GetProcAddress
(
gdi32
,
"SetLayout"
);
pMirrorRgn
=
(
void
*
)
GetProcAddress
(
gdi32
,
"MirrorRgn"
);
...
...
@@ -6562,6 +6654,7 @@ START_TEST(win)
test_capture_3
(
hwndMain
,
hwndMain2
);
test_capture_4
();
test_rtl_layout
();
test_FlashWindowEx
();
test_CreateWindow
();
test_parent_owner
();
...
...
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