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
440db38e
Commit
440db38e
authored
Oct 10, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Moved optional message loop in tests to its own function.
parent
b8fe0200
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
editor.c
dlls/riched20/tests/editor.c
+22
-15
No files found.
dlls/riched20/tests/editor.c
View file @
440db38e
...
@@ -57,6 +57,26 @@ static HWND new_richedit(HWND parent) {
...
@@ -57,6 +57,26 @@ static HWND new_richedit(HWND parent) {
return
new_window
(
RICHEDIT_CLASS
,
ES_MULTILINE
,
parent
);
return
new_window
(
RICHEDIT_CLASS
,
ES_MULTILINE
,
parent
);
}
}
/* Keeps the window reponsive for the deley_time in seconds.
* This is useful for debugging a test to see what is happening. */
void
keep_responsive
(
time_t
delay_time
)
{
MSG
msg
;
time_t
end
;
/* The message pump uses PeekMessage() to empty the queue and then
* sleeps for 50ms before retrying the queue. */
end
=
time
(
NULL
)
+
delay_time
;
while
(
time
(
NULL
)
<
end
)
{
if
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
else
{
Sleep
(
50
);
}
}
}
static
void
processPendingMessages
(
void
)
static
void
processPendingMessages
(
void
)
{
{
MSG
msg
;
MSG
msg
;
...
@@ -5443,9 +5463,6 @@ static void test_EM_CHARFROMPOS(void)
...
@@ -5443,9 +5463,6 @@ static void test_EM_CHARFROMPOS(void)
START_TEST
(
editor
)
START_TEST
(
editor
)
{
{
MSG
msg
;
time_t
end
;
/* Must explicitly LoadLibrary(). The test has no references to functions in
/* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED20.DLL, so the linker doesn't actually link to it. */
* RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit
=
LoadLibrary
(
"RICHED20.DLL"
);
hmoduleRichEdit
=
LoadLibrary
(
"RICHED20.DLL"
);
...
@@ -5494,19 +5511,9 @@ START_TEST( editor )
...
@@ -5494,19 +5511,9 @@ START_TEST( editor )
/* Set the environment variable WINETEST_RICHED20 to keep windows
/* Set the environment variable WINETEST_RICHED20 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
* responsive and open for 30 seconds. This is useful for debugging.
*
*/
* The message pump uses PeekMessage() to empty the queue and then sleeps for
* 50ms before retrying the queue. */
end
=
time
(
NULL
)
+
30
;
if
(
getenv
(
"WINETEST_RICHED20"
))
{
if
(
getenv
(
"WINETEST_RICHED20"
))
{
while
(
time
(
NULL
)
<
end
)
{
keep_responsive
(
30
);
if
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
else
{
Sleep
(
50
);
}
}
}
}
OleFlushClipboard
();
OleFlushClipboard
();
...
...
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