Title: [145890] trunk/Tools
Revision
145890
Author
zeno.albis...@digia.com
Date
2013-03-15 03:17:14 -0700 (Fri, 15 Mar 2013)

Log Message

[Qt] Remove simple getters and setters from TestRunnerQt
https://bugs.webkit.org/show_bug.cgi?id=112343

Reviewed by Benjamin Poulain.

The removed functions and boolean members
are being replaced by the implementations in the
generic TestRunner.h.

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(DumpRenderTree::dumpFrameScrollPosition):
(DumpRenderTree::dumpFramesAsText):
(DumpRenderTree::dump):
(DumpRenderTree::titleChanged):
(DumpRenderTree::dumpDatabaseQuota):
(DumpRenderTree::dumpApplicationCacheQuota):
(DumpRenderTree::statusBarMessage):
(DumpRenderTree::createWindow):
* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunnerQt::reset):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunnerQt):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (145889 => 145890)


--- trunk/Tools/ChangeLog	2013-03-15 10:08:21 UTC (rev 145889)
+++ trunk/Tools/ChangeLog	2013-03-15 10:17:14 UTC (rev 145890)
@@ -1,3 +1,28 @@
+2013-03-15  Zeno Albisser  <z...@webkit.org>
+
+        [Qt] Remove simple getters and setters from TestRunnerQt
+        https://bugs.webkit.org/show_bug.cgi?id=112343
+
+        Reviewed by Benjamin Poulain.
+
+        The removed functions and boolean members
+        are being replaced by the implementations in the
+        generic TestRunner.h.
+
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        (DumpRenderTree::dumpFrameScrollPosition):
+        (DumpRenderTree::dumpFramesAsText):
+        (DumpRenderTree::dump):
+        (DumpRenderTree::titleChanged):
+        (DumpRenderTree::dumpDatabaseQuota):
+        (DumpRenderTree::dumpApplicationCacheQuota):
+        (DumpRenderTree::statusBarMessage):
+        (DumpRenderTree::createWindow):
+        * DumpRenderTree/qt/TestRunnerQt.cpp:
+        (TestRunnerQt::reset):
+        * DumpRenderTree/qt/TestRunnerQt.h:
+        (TestRunnerQt):
+
 2013-03-15  Ryosuke Niwa  <rn...@webkit.org>
 
         Update the link on build.webkit.org to refer to perf.webkit.org

Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (145889 => 145890)


--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2013-03-15 10:08:21 UTC (rev 145889)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2013-03-15 10:17:14 UTC (rev 145890)
@@ -823,7 +823,7 @@
         result.append(QString("scrolled to %1,%2\n").arg(pos.x()).arg(pos.y()));
     }
 
-    if (m_controller->shouldDumpChildFrameScrollPositions()) {
+    if (m_jscController->dumpChildFrameScrollPositions()) {
         QList<QWebFrame*> children = frame->childFrames();
         for (int i = 0; i < children.size(); ++i)
             result += dumpFrameScrollPosition(children.at(i));
@@ -848,7 +848,7 @@
     result.append(innerText);
     result.append(QLatin1String("\n"));
 
-    if (m_controller->shouldDumpChildrenAsText()) {
+    if (m_jscController->dumpChildFramesAsText()) {
         QList<QWebFrame *> children = frame->childFrames();
         for (int i = 0; i < children.size(); ++i)
             result += dumpFramesAsText(children.at(i));
@@ -1002,7 +1002,7 @@
 
     if (m_dumpPixelsForCurrentTest && m_jscController->generatePixelResults()) {
         QImage image;
-        if (!m_controller->isPrinting()) {
+        if (!m_jscController->isPrinting()) {
             image = QImage(m_page->viewportSize(), QImage::Format_ARGB32);
             image.fill(Qt::white);
             QPainter painter(&image);
@@ -1083,7 +1083,7 @@
 
 void DumpRenderTree::titleChanged(const QString &s)
 {
-    if (m_controller->shouldDumpTitleChanges())
+    if (m_jscController->dumpTitleChanges())
         printf("TITLE CHANGED: '%s'\n", s.toUtf8().data());
 }
 
@@ -1096,7 +1096,7 @@
 
 void DumpRenderTree::dumpDatabaseQuota(QWebFrame* frame, const QString& dbName)
 {
-    if (!m_controller->shouldDumpDatabaseCallbacks())
+    if (!m_jscController->dumpDatabaseCallbacks())
         return;
     QWebSecurityOrigin origin = frame->securityOrigin();
     printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n",
@@ -1109,7 +1109,7 @@
 
 void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded)
 {
-    if (m_controller->shouldDumpApplicationCacheDelegateCallbacks()) {
+    if (m_jscController->dumpApplicationCacheDelegateCallbacks()) {
         // For example, numbers from 30000 - 39999 will output as 30000.
         // Rounding up or down not really matter for these tests. It's
         // sufficient to just get a range of 10000 to determine if we were
@@ -1131,7 +1131,7 @@
 
 void DumpRenderTree::statusBarMessage(const QString& message)
 {
-    if (!m_controller->shouldDumpStatusCallbacks())
+    if (!m_jscController->dumpStatusCallbacks())
         return;
 
     printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", message.toUtf8().constData());
@@ -1139,7 +1139,7 @@
 
 QWebPage *DumpRenderTree::createWindow()
 {
-    if (!m_controller->canOpenWindows())
+    if (!m_jscController->canOpenWindows())
         return 0;
 
     // Create a dummy container object to track the page in DRT.

Modified: trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp (145889 => 145890)


--- trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp	2013-03-15 10:08:21 UTC (rev 145889)
+++ trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp	2013-03-15 10:17:14 UTC (rev 145890)
@@ -58,14 +58,7 @@
     m_hasDumped = false;
     m_loadFinished = false;
     m_audioDump = false;
-    m_dumpChildrenAsText = false;
-    m_dumpChildFrameScrollPositions = false;
-    m_canOpenWindows = false;
     m_waitForDone = false;
-    m_dumpTitleChanges = false;
-    m_dumpDatabaseCallbacks = false;
-    m_dumpApplicationCacheDelegateCallbacks = false;
-    m_dumpStatusCallbacks = false;
     m_timeoutTimer.stop();
     m_topLoadingFrame = 0;
     m_waitForPolicy = false;
@@ -75,7 +68,6 @@
     m_userStyleSheetEnabled = false;
     m_ignoreDesktopNotification = false;
     m_isGeolocationPermissionSet = false;
-    m_isPrinting = false;
     m_geolocationPermission = false;
     m_audioData.clear();
 

Modified: trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h (145889 => 145890)


--- trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h	2013-03-15 10:08:21 UTC (rev 145889)
+++ trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h	2013-03-15 10:17:14 UTC (rev 145890)
@@ -59,18 +59,10 @@
     TestRunnerQt(DumpRenderTree*);
 
     bool shouldDumpAsAudio() const { return m_audioDump; }
-    bool shouldDumpChildrenAsText() const { return m_dumpChildrenAsText; }
-    bool shouldDumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; }
-    bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
-    bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
-    bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
     bool shouldWaitUntilDone() const { return m_waitForDone; }
     bool shouldHandleErrorPages() const { return m_handleErrorPages; }
-    bool canOpenWindows() const { return m_canOpenWindows; }
-    bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; }
     bool waitForPolicy() const { return m_waitForPolicy; }
     bool ignoreReqestForPermission() const { return m_ignoreDesktopNotification; }
-    bool isPrinting() { return m_isPrinting; }
 
     const QByteArray& audioData() const { return m_audioData; }
 
@@ -94,14 +86,7 @@
 
 public Q_SLOTS:
     void maybeDump(bool ok);
-    void dumpChildFramesAsText() { m_dumpChildrenAsText = true; }
-    void dumpChildFrameScrollPositions() { m_dumpChildFrameScrollPositions = true; }
-    void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; }
-    void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; }
-    void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
     void dumpNotifications();
-    void setCanOpenWindows() { m_canOpenWindows = true; }
-    void setPrinting() { m_isPrinting = true; }
     void waitUntilDone();
     int webHistoryItemCount();
     void keepWebHistory();
@@ -139,7 +124,6 @@
     void displayInvalidatedRegion();
     void clearBackForwardList();
     QString pathToLocalResource(const QString& url);
-    void dumpTitleChanges() { m_dumpTitleChanges = true; }
     QString encodeHostName(const QString& host);
     QString decodeHostName(const QString& host);
     void dumpSelectionRect() const { }
@@ -253,21 +237,14 @@
     bool m_hasDumped;
     bool m_audioDump;
     bool m_disallowIncreaseForApplicationCacheQuota;
-    bool m_dumpChildrenAsText;
-    bool m_dumpChildFrameScrollPositions;
     bool m_canOpenWindows;
     bool m_waitForDone;
-    bool m_dumpTitleChanges;
-    bool m_dumpDatabaseCallbacks;
-    bool m_dumpApplicationCacheDelegateCallbacks;
-    bool m_dumpStatusCallbacks;
     bool m_waitForPolicy;
     bool m_handleErrorPages;
     bool m_loadFinished;
     bool m_globalFlag;
     bool m_userStyleSheetEnabled;
     bool m_isGeolocationPermissionSet;
-    bool m_isPrinting;
     bool m_geolocationPermission;
 
     QUrl m_userStyleSheetLocation;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to