2009-03-29 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Mar 2009 17:31:51 +0000 (17:31 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Mar 2009 17:31:51 +0000 (17:31 +0000)
        * DumpRenderTree/qt/jsobjects.cpp: Rolled out changes to this file. Maybe this will fix
        Qt building of DumpRenderTree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42085 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/jsobjects.cpp

index b8f7e38..86808bb 100644 (file)
@@ -1,5 +1,10 @@
 2009-03-29  Darin Adler  <darin@apple.com>
 
 2009-03-29  Darin Adler  <darin@apple.com>
 
+        * DumpRenderTree/qt/jsobjects.cpp: Rolled out changes to this file. Maybe this will fix
+        Qt building of DumpRenderTree.
+
+2009-03-29  Darin Adler  <darin@apple.com>
+
         Reviewed by Cameron Zwarich.
 
         Bug 24922: change WorkQueue-based navigation tests to not depend on synchronous form submission
         Reviewed by Cameron Zwarich.
 
         Bug 24922: change WorkQueue-based navigation tests to not depend on synchronous form submission
index 427fc51..2b0f174 100644 (file)
@@ -132,8 +132,16 @@ void LayoutTestController::processWork()
 {
     qDebug() << ">>>processWork";
 
 {
     qDebug() << ">>>processWork";
 
-    // if we finish all the commands, we're ready to dump state
-    if (WorkQueue::shared()->processWork() && !shouldWaitUntilDone()) {
+    // quit doing work once a load is in progress
+    while (WorkQueue::shared()->count() > 0 && !m_topLoadingFrame) {
+        WorkQueueItem* item = WorkQueue::shared()->dequeue();
+        Q_ASSERT(item);
+        item->invoke();
+        delete item;
+    }
+
+    // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+    if (!m_topLoadingFrame && !shouldWaitUntilDone()) {
         emit done();
         m_isLoading = false;
     }
         emit done();
         m_isLoading = false;
     }
@@ -193,6 +201,18 @@ void LayoutTestController::dumpResourceLoadCallbacks()
     qt_dump_resource_load_callbacks(true);
 }
 
     qt_dump_resource_load_callbacks(true);
 }
 
+void LayoutTestController::queueBackNavigation(int howFarBackward)
+{
+    //qDebug() << ">>>queueBackNavigation" << howFarBackward;
+    WorkQueue::shared()->queue(new BackItem(howFarBackward, m_drt->webPage()));
+}
+
+void LayoutTestController::queueForwardNavigation(int howFarForward)
+{
+    //qDebug() << ">>>queueForwardNavigation" << howFarForward;
+    WorkQueue::shared()->queue(new ForwardItem(howFarForward, m_drt->webPage()));
+}
+
 void LayoutTestController::queueLoad(const QString &url, const QString &target)
 {
     //qDebug() << ">>>queueLoad" << url << target;
 void LayoutTestController::queueLoad(const QString &url, const QString &target)
 {
     //qDebug() << ">>>queueLoad" << url << target;
@@ -201,6 +221,18 @@ void LayoutTestController::queueLoad(const QString &url, const QString &target)
     WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
 }
 
     WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
 }
 
+void LayoutTestController::queueReload()
+{
+    //qDebug() << ">>>queueReload";
+    WorkQueue::shared()->queue(new ReloadItem(m_drt->webPage()));
+}
+
+void LayoutTestController::queueScript(const QString &url)
+{
+    //qDebug() << ">>>queueScript" << url;
+    WorkQueue::shared()->queue(new ScriptItem(url, m_drt->webPage()));
+}
+
 void LayoutTestController::provisionalLoad()
 {
     QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
 void LayoutTestController::provisionalLoad()
 {
     QWebFrame *frame = qobject_cast<QWebFrame*>(sender());