2010-10-19 Sergio Villar Senín <svillar@igalia.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 08:48:57 +0000 (08:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 08:48:57 +0000 (08:48 +0000)
        Reviewed by Xan Lopez.

        [GTK] http/history tests are failing
        https://bugs.webkit.org/show_bug.cgi?id=36173

        Removed skipped tests from http/history

        * platform/gtk/Skipped:
2010-10-19  Sergio Villar Senín  <svillar@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] http/history tests are failing
        https://bugs.webkit.org/show_bug.cgi?id=36173

        Clear the history each time a test is run. Return the actual
        history item count when calling
        LayoutTestController::webHistoryItemCount

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (resetDefaultsToConsistentValues):
        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        (LayoutTestController::webHistoryItemCount):

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

index 1c472f2..51d03a3 100644 (file)
@@ -1,3 +1,14 @@
+2010-10-19  Sergio Villar Senín  <svillar@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] http/history tests are failing
+        https://bugs.webkit.org/show_bug.cgi?id=36173
+
+        Removed skipped tests from http/history
+
+        * platform/gtk/Skipped:
+
 2010-10-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         Unreviewed.
index 6571da1..924e1f8 100644 (file)
@@ -2961,23 +2961,6 @@ http/tests/appcache/offline-access.html
 http/tests/appcache/origin-quota.html
 http/tests/appcache/resource-redirect-2.html
 http/tests/cookies/double-quoted-value-with-semi-colon.html
-http/tests/history/redirect-200-refresh-2-seconds.pl
-http/tests/history/redirect-js-document-location-0-seconds.html
-http/tests/history/redirect-js-document-location-2-seconds.html
-http/tests/history/redirect-js-document-location-before-load.html
-http/tests/history/redirect-js-form-submit-0-seconds.html
-http/tests/history/redirect-js-form-submit-2-seconds.html
-http/tests/history/redirect-js-form-submit-before-load.html
-http/tests/history/redirect-js-location-0-seconds.html
-http/tests/history/redirect-js-location-2-seconds.html
-http/tests/history/redirect-js-location-assign-0-seconds.html
-http/tests/history/redirect-js-location-assign-2-seconds.html
-http/tests/history/redirect-js-location-assign-before-load.html
-http/tests/history/redirect-js-location-before-load.html
-http/tests/history/redirect-js-location-href-0-seconds.html
-http/tests/history/redirect-js-location-href-2-seconds.html
-http/tests/history/redirect-js-location-href-before-load.html
-http/tests/history/redirect-meta-refresh-2-seconds.html
 http/tests/incremental/slow-utf8-text.pl
 http/tests/loading/bad-scheme-subframe.html
 http/tests/loading/bad-server-subframe.html
index d394057..dec0cfc 100644 (file)
@@ -1,3 +1,19 @@
+2010-10-19  Sergio Villar Senín  <svillar@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] http/history tests are failing
+        https://bugs.webkit.org/show_bug.cgi?id=36173
+
+        Clear the history each time a test is run. Return the actual
+        history item count when calling
+        LayoutTestController::webHistoryItemCount
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::webHistoryItemCount):
+
 2010-10-18  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Adam Barth.
index 01de0a6..e115683 100644 (file)
@@ -419,6 +419,9 @@ static void resetDefaultsToConsistentValues()
 
     webkit_reset_origin_access_white_lists();
 
+    WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView);
+    webkit_web_back_forward_list_clear(list);
+
 #ifdef HAVE_LIBSOUP_2_29_90
     SoupSession* session = webkit_get_default_session();
     SoupCookieJar* jar = reinterpret_cast<SoupCookieJar*>(soup_session_get_feature(session, SOUP_TYPE_COOKIE_JAR));
index 004df4d..181ef9f 100644 (file)
@@ -183,8 +183,16 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
 
 size_t LayoutTestController::webHistoryItemCount()
 {
-    // FIXME: implement
-    return 0;
+    WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+    WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView);
+
+    if (!list)
+        return -1;
+
+    // We do not add the current page to the total count as it's not
+    // considered in DRT tests
+    return webkit_web_back_forward_list_get_back_length(list) +
+            webkit_web_back_forward_list_get_forward_length(list);
 }
 
 unsigned LayoutTestController::workerThreadCount() const