Commit d7f285c2 authored by eric@webkit.org's avatar eric@webkit.org

2010-01-28 Benjamin Poulain <benjamin.poulain@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Implement the display() method of the layout test controller
        https://bugs.webkit.org/show_bug.cgi?id=34258

        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
        (WebCore::DumpRenderTree::DumpRenderTree):
        (WebCore::DumpRenderTree::showPage):
        (WebCore::DumpRenderTree::hidePage):
        * DumpRenderTree/qt/DumpRenderTreeQt.h:
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::reset):
        (LayoutTestController::display):
        * DumpRenderTree/qt/LayoutTestControllerQt.h:

git-svn-id: svn://svn.chromium.org/blink/trunk@54000 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f32b2d07
2010-01-28 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Implement the display() method of the layout test controller
https://bugs.webkit.org/show_bug.cgi?id=34258
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::DumpRenderTree):
(WebCore::DumpRenderTree::showPage):
(WebCore::DumpRenderTree::hidePage):
* DumpRenderTree/qt/DumpRenderTreeQt.h:
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::reset):
(LayoutTestController::display):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
2010-01-28 Chris Jerdonek <cjerdonek@webkit.org>
Reviewed by Shinichiro Hamaji.
......
......@@ -328,6 +328,9 @@ DumpRenderTree::DumpRenderTree()
// create our controllers. This has to be done before connectFrame,
// as it exports there to the JavaScript DOM window.
m_controller = new LayoutTestController(this);
connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
m_eventSender = new EventSender(m_page);
m_textInputController = new TextInputController(m_page);
......@@ -529,6 +532,18 @@ void DumpRenderTree::initJSObjects()
frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
}
void DumpRenderTree::showPage()
{
m_mainView->show();
QCoreApplication::processEvents();
}
void DumpRenderTree::hidePage()
{
m_mainView->hide();
QCoreApplication::processEvents();
}
QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
{
......
......@@ -115,6 +115,10 @@ Q_SIGNALS:
void quit();
void ready();
private Q_SLOTS:
void showPage();
void hidePage();
private:
QString dumpFramesAsText(QWebFrame* frame);
QString dumpBackForwardList();
......
......@@ -75,6 +75,7 @@ void LayoutTestController::reset()
m_webHistory = 0;
qt_dump_editing_callbacks(false);
qt_dump_resource_load_callbacks(false);
emit hidePage();
}
void LayoutTestController::processWork()
......@@ -177,6 +178,11 @@ int LayoutTestController::windowCount()
return m_drt->windowCount();
}
void LayoutTestController::display()
{
emit showPage();
}
void LayoutTestController::clearBackForwardList()
{
m_drt->webPage()->history()->clear();
......
......@@ -75,6 +75,9 @@ protected:
signals:
void done();
void showPage();
void hidePage();
public slots:
void maybeDump(bool ok);
void dumpAsText() { m_textDump = true; }
......@@ -100,7 +103,7 @@ public slots:
void provisionalLoad();
void setCloseRemainingWindowsWhenComplete(bool = false) {}
int windowCount();
void display() {}
void display();
void clearBackForwardList();
QString pathToLocalResource(const QString& url);
void dumpTitleChanges() { m_dumpTitleChanges = true; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment