24 #ifdef BLUEBERRY_DEBUG_SMARTPOINTER
44 long ,
const QString& )
54 CPPUNIT_FAIL(message.toStdString() +
": " + e.what());
63 const QString& perspectiveId)
69 WaitOnShell(window->GetShell());
71 }
catch (
const WorkbenchException& e)
73 CPPUNIT_FAIL(e.what());
80 while (!testWindows.empty())
82 testWindows.back()->Close();
83 testWindows.pop_back();
111 return QList<IWorkbenchPage::Pointer>();
128 QString name = QString::fromStdString(this->getName());
129 Trace(
"----- " + name);
130 Trace(name +
": setUp...");
142 Trace(QString::fromStdString(this->getName()) +
": tearDown...\n");
143 RemoveWindowListener();
164 windowListener->SetEnabled(manage);
173 QList<IWorkbenchWindow::Pointer>& testWindows)
174 : enabled(true), testWindows(testWindows)
180 this->enabled = enabled;
199 testWindows.removeAll(window);
206 testWindows.push_back(window);
209 void UITestCase::Indent(std::ostream& output,
unsigned int indent)
211 for (
unsigned int i = 0; i < indent; i++)
242 void UITestCase::AddWindowListener()
244 windowListener.reset(
new TestWindowListener(testWindows));
248 void UITestCase::RemoveWindowListener()
void WindowDeactivated(const IWorkbenchWindow::Pointer &window)
UITestCase(const QString &testName)
static void ProcessEvents()
void WindowOpened(const IWorkbenchWindow::Pointer &window)
void ManageWindows(bool manage)
virtual void RemoveWindowListener(IWindowListener *listener)=0
IWorkbenchWindow::Pointer OpenTestWindow()
IWorkbenchPage::Pointer OpenTestPage(const IWorkbenchWindow::Pointer &win)
void Trace(const QString &msg)
IWorkbench * GetWorkbench()
berry::SmartPointer< Self > Pointer
void failexc(const QString &message, const std::exception &e, long lineNumber=-1, const QString &fileName="unknown")
static const QString PERSP_ID
virtual IWorkbenchWindow::Pointer OpenWorkbenchWindow(const QString &perspectiveId, IAdaptable *input)=0
void SetEnabled(bool enabled)
static IAdaptable * GetPageInput()
virtual void DoTearDown()
void CloseAllTestWindows()
virtual void AddWindowListener(IWindowListener *listener)=0
void WindowActivated(const IWorkbenchWindow::Pointer &window)
void CloseAllPages(const IWorkbenchWindow::Pointer &window)
void WindowClosed(const IWorkbenchWindow::Pointer &window)
TestWindowListener(QList< IWorkbenchWindow::Pointer > &testWindows)