Commit Graph

18 Commits

Author SHA1 Message Date
Vadim Zeitlin
c92b39a13d Disable tests requiring a WM under Xvfb
Both iconization and activation of TLWs is dependent on the presence of
a WM, but there is no WM running under Xvfb, so skip these tests in this
case.
2019-07-18 17:45:20 +02:00
Vadim Zeitlin
0a7b5a9879 Ensure that test windows are destroyed in TLW unit test
Don't leave the maximized frame created in the test case for getting
events from it lying around needlessly.
2019-02-02 17:31:05 +01:00
Vadim Zeitlin
f9323e4b87 Enable tests for wxTopLevelWindow::IsActive() for wxGTK too
After the addition of EventCounter::WaitEvent() call in the previous
commit these checks pass as well (with another WaitEvent() added to wait
for deactivation event as well).
2019-01-29 00:16:52 +01:00
Vadim Zeitlin
e599e26395 Test that showing a TLW generates wxActivateEvent
Wait until wxEVT_ACTIVATE arrives and check that it does.
2019-01-29 00:16:50 +01:00
Vadim Zeitlin
5811d541da Refactor code waiting for events in the test suite
We already had WX_ASSERT_EVENT_OCCURS_IN macro and a recent commit also
added code doing almost the same thing manually in wxTopLevelWindow unit
test, which was one version too many.

Replace both of them with the new EventCounter::WaitEvent().

No real changes, this is just a refactoring.
2019-01-24 22:52:46 +01:00
Vojtech Kral
63432e5ef5 Fix wxShowEvent not being received for maximized frames on MSW
Send wxEVT_SHOW explicitly when showing a maximized TLW under MSW as the
system doesn't send WM_SHOW in this case (as documented in the MSDN and
also confirmed by testing).

Closes https://github.com/wxWidgets/wxWidgets/pull/1153
2019-01-21 18:38:46 +01:00
Vadim Zeitlin
f03d655b1a Enable running TLW activation unit tests in CI environments
Hopefully the previous commit fixed it under AppVeyor.
2018-06-22 02:44:40 +02:00
Vadim Zeitlin
a8c1ae7058 Fix TLW activation unit test
Ensure that another TLW is active before calling ShowWithoutActivating()
as otherwise the newly shown window would be considered active, even if
it actually isn't, because it contains the current focus.
2018-06-22 02:43:23 +02:00
Vadim Zeitlin
0c29775d4d Skip wxTopLevelWindow showing/activation tests in CI builds
It doesn't seem to work when run unattended, for whatever reason.
2017-11-25 11:13:02 +01:00
Vadim Zeitlin
ba5a203105 Rewrite TLW unit test as a single function
Get rid of the unnecessary test case class.

No real changes yet.
2017-11-24 22:55:11 +01:00
Vadim Zeitlin
c13e28ebfb Disable wxTopLevelWindow::IsActive() unit test for wxGTK
It just doesn't work in the test, so live without it for now.

Also use CHECK() instead of CPPUNIT_ASSERT(), which expands into
REQUIRE(), for independent tests to let later tests to still be done
even if an earlier one fails.
2017-11-07 16:16:08 +01:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
7cd60fb938 No changes, just cleanup TopLevelWindowTestCase unit test a little.
Remove the unnecessary overrides of setUp() and tearDown().

Also get rid of trailing whitespace.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:29:14 +00:00
Dimitri Schoolwerth
1b54c33f81 Rebaked test GUI projects with toplevel.cpp included.
Added toplevel.cpp to GUI test projects and removed the test suite from the unnamed registry so that by default its tests don't run (some regarding ShowWithoutActivating are failing). This way at least the source file has more of a chance to be in a compilable state (compilation was broken). toplevel.cpp has never been included in a project since its addition in r62508 ("[...] until the mainloop issues are resolved [...]").

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-01 14:58:58 +00:00
Dimitri Schoolwerth
e3778b4d9c No code changes, fixed some typos.
Changed several occurrences of "it's" where "its" is meant, as well as a few other minor typos.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-30 10:57:04 +00:00
Dimitri Schoolwerth
b5b208a179 Set svn properties on .cpp files.
Add missing svn:eol-style property to all .cpp files. Also set svn:keywords for .cpp files which don't have that property yet to Id, including src/osx/core/glgrab.cpp for consistency (it doesn't make use of the property).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-17 11:17:55 +00:00
Kevin Ollivier
dbc7ceb925 Initial ShowWithoutActivating implementations for Mac and Windows, and attempt to improve IsActive behavior on Mac. Also adding ShowWithoutActivating() and Show/Hide tests, but until the mainloop issues are resolved, not adding them to tests.bkl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-30 05:04:47 +00:00