riched20/tests: Don't specify DT_WORDBREAK in _check_txgetnaturalsize().
Today, test_TxGetNaturalSize() creates a pop-up window with a fixed size
(extent) of 100 x 100. The test function then proceeds to compute the
natural size of rich edit control that fits the sample text
"TestSomeText" and compare it to the RECT calculated by DrawText.
Apparently, this test fails if the width of the sample text
"TestSomeText" exceeds the width of the test window's client area. In
this case, DrawText() with DT_WORDBREAK breaks the text into the two
lines due to text wrapping; however, Rich Edit's
ITextServices::TxGetNaturalSize implementation does not seem to perform
text wrapping on overflow. This results in extent mismatch.
(Note that the test may either succeed or fail depending on the current
font used for DEFAULT_GUI_FONT, which defaults to Tahoma according to
Microsoft's documentation. To reproduce this failure, it may be
necessary to switch fonts or change the width of the pop-up window.)
Fix this by omitting the DT_WORDBREAK flag for the DrawText() call in
_check_txgetnaturalsize().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54637
Showing
Please
register
or
sign in
to comment