Merge the new GUI tests from SOC2010_GUI_TEST branch.

Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-22 22:16:05 +00:00
parent 571d991bb3
commit 232fdc630c
79 changed files with 9150 additions and 491 deletions

View File

@@ -51,7 +51,12 @@
#include "wx/osx/private.h"
#endif
#if wxUSE_GUI
#include "testableframe.h"
#endif
#include "wx/socket.h"
#include "wx/evtloop.h"
using namespace std;
@@ -284,6 +289,9 @@ private:
wxArrayString m_registries;
wxLocale *m_locale;
// event loop for GUI tests
wxEventLoop* m_eventloop;
// event handling hooks
FilterEventFunc m_filterEventFunc;
ProcessEventFunc m_processEventFunc;
@@ -400,6 +408,7 @@ TestApp::TestApp()
m_processEventFunc = NULL;
m_locale = NULL;
m_eventloop = NULL;
}
// Init
@@ -418,7 +427,11 @@ bool TestApp::OnInit()
#if wxUSE_GUI
// create a hidden parent window to be used as parent for the GUI controls
new wxFrame(NULL, wxID_ANY, "Hidden wx test frame");
wxTestableFrame* frame = new wxTestableFrame();
frame->Show();
m_eventloop = new wxEventLoop;
wxEventLoop::SetActive(m_eventloop);
#endif // wxUSE_GUI
return true;
@@ -595,6 +608,8 @@ int TestApp::OnExit()
#if wxUSE_GUI
delete GetTopWindow();
wxEventLoop::SetActive(NULL);
delete m_eventloop;
#endif // wxUSE_GUI
return 0;