summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:04:37 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:04:37 +0000
commit89815ce96ee2231190078a4a093c85848816e13f (patch)
tree8cc4951f98bffeba74d951fdbf2ead4148ac0f7d
parent6b6ff48255f9942d24ae7db916ed535abc50abbd (diff)
downloadchromium_src-89815ce96ee2231190078a4a093c85848816e13f.zip
chromium_src-89815ce96ee2231190078a4a093c85848816e13f.tar.gz
chromium_src-89815ce96ee2231190078a4a093c85848816e13f.tar.bz2
Adds implementation of web history in LayoutTestController, causing 18 failing layout tests to pass.
Review URL: http://codereview.chromium.org/19544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9086 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/layout_tests/test_lists/tests_fixable.txt24
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc10
-rw-r--r--webkit/tools/test_shell/layout_test_controller.h9
3 files changed, 18 insertions, 25 deletions
diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
index d694a0c..d55bde8 100644
--- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
@@ -1735,31 +1735,13 @@ WIN : LayoutTests/http/tests/security/cross-frame-access-protocol.html = FAIL
WIN : LayoutTests/http/tests/security/originHeader/origin-header-for-https.html = FAIL
LINUX WIN : chrome/fast/forms/textarea-metrics.html = FAIL
-// Merge 40314:40364 -- new tests that need
-// layoutTestController.keepWebHistory() implemented.
-LayoutTests/http/tests/history/redirect-meta-refresh-2-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-307.pl = FAIL
-LayoutTests/http/tests/history/redirect-js-location-assign-before-load.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-href-0-seconds.html = FAIL
+// Merge 40314:40364
+// The following tests still fail with the WebHistory implementation.
LayoutTests/http/tests/history/redirect-200-refresh-0-seconds.pl = FAIL
-LayoutTests/http/tests/history/redirect-200-refresh-2-seconds.pl = FAIL
-LayoutTests/http/tests/history/redirect-js-location-href-2-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-302.pl = FAIL
-LayoutTests/http/tests/history/redirect-js-location-0-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-2-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-href-before-load.html = FAIL
LayoutTests/http/tests/history/redirect-js-location-replace-0-seconds.html = FAIL
LayoutTests/http/tests/history/redirect-js-location-replace-2-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-document-location-0-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-document-location-2-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-assign-0-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-before-load.html = FAIL
-LayoutTests/http/tests/history/redirect-js-location-assign-2-seconds.html = FAIL
LayoutTests/http/tests/history/redirect-js-location-replace-before-load.html = FAIL
-LayoutTests/http/tests/history/redirect-301.pl = FAIL
-LayoutTests/http/tests/history/redirect-js-document-location-before-load.html = FAIL
LayoutTests/http/tests/history/redirect-meta-refresh-0-seconds.html = FAIL
-LayoutTests/http/tests/history/redirect-303.pl = FAIL
// Merge 40314:40364 -- new tests
// See also comment above for LayoutTests/editing/spelling/inline_spelling_markers.html
@@ -1777,7 +1759,7 @@ LINUX WIN : LayoutTests/svg/W3C-SVG-1.1/pservers-grad-06-b.svg = FAIL
// Merge 40364:40409 -- fails after http://trac.webkit.org/changeset/40379
// ASSERTs in Debug after this change: http://trac.webkit.org/changeset/40372
-// Likely will be fixed with subsequent merge.
+// Likely will be fixed with subsequent merge.
SKIP : LayoutTests/fast/dynamic/insert-before-table-part-in-continuation.html = CRASH
// New tests added in http://trac.webkit.org/changeset/40424
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 45c5a38..9bbd417 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -18,6 +18,7 @@
#include "webkit/glue/webframe.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview.h"
+#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell.h"
using std::string;
@@ -54,6 +55,7 @@ bool LayoutTestController::should_add_file_to_pasteboard_ = false;
bool LayoutTestController::stop_provisional_frame_loads_ = false;
LayoutTestController::WorkQueue LayoutTestController::work_queue_;
CppVariant LayoutTestController::globalFlag_;
+CppVariant LayoutTestController::webHistoryItemCount_;
LayoutTestController::LayoutTestController(TestShell* shell) {
// Set static shell_ variable since we can't do it in an initializer list.
@@ -129,9 +131,12 @@ LayoutTestController::LayoutTestController(TestShell* shell) {
// The fallback method is called when an unknown method is invoked.
BindFallbackMethod(&LayoutTestController::fallbackMethod);
- // Shared property used by a number of layout tests in
+ // Shared properties.
+ // globalFlag is used by a number of layout tests in
// LayoutTests\http\tests\security\dataURL.
BindProperty("globalFlag", &globalFlag_);
+ // webHistoryItemCount is used by tests in LayoutTests\http\tests\history
+ BindProperty("webHistoryItemCount", &webHistoryItemCount_);
}
LayoutTestController::WorkQueue::~WorkQueue() {
@@ -374,6 +379,7 @@ void LayoutTestController::Reset() {
should_add_file_to_pasteboard_ = false;
stop_provisional_frame_loads_ = false;
globalFlag_.Set(false);
+ webHistoryItemCount_.Set(0);
if (close_remaining_windows_) {
// Iterate through the window list and close everything except the original
@@ -398,6 +404,8 @@ void LayoutTestController::Reset() {
}
void LayoutTestController::LocationChangeDone() {
+ webHistoryItemCount_.Set(shell_->navigation_controller()->GetEntryCount());
+
// no more new work after the first complete load.
work_queue_.set_frozen(true);
diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h
index 1be0e59..251524b72 100644
--- a/webkit/tools/test_shell/layout_test_controller.h
+++ b/webkit/tools/test_shell/layout_test_controller.h
@@ -11,8 +11,8 @@
sort of output they produce.
*/
-#ifndef WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H__
-#define WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H__
+#ifndef WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_
+#define WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_
#include <queue>
@@ -305,7 +305,10 @@ class LayoutTestController : public CppBoundClass {
static WorkQueue work_queue_;
static CppVariant globalFlag_;
+
+ // Bound variable counting the number of top URLs visited.
+ static CppVariant webHistoryItemCount_;
};
-#endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H__
+#endif // WEBKIT_TOOLS_TEST_SHELL_LAYOUT_TEST_CONTROLLER_H_