summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_navigation_controller.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 06:21:01 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 06:21:01 +0000
commit4781156a2c2dca5839906c18f7eedf0fe808fb23 (patch)
treeebc644136085edd95ee30b72dcade4654257dce4 /webkit/tools/test_shell/test_navigation_controller.cc
parent876b0c451041fad7be429632de5066e4e30bf625 (diff)
downloadchromium_src-4781156a2c2dca5839906c18f7eedf0fe808fb23.zip
chromium_src-4781156a2c2dca5839906c18f7eedf0fe808fb23.tar.gz
chromium_src-4781156a2c2dca5839906c18f7eedf0fe808fb23.tar.bz2
Revert r15940 again. Unexpected layout test failures :(
TBR=mpcomplete git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_navigation_controller.cc')
-rw-r--r--webkit/tools/test_shell/test_navigation_controller.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_navigation_controller.cc b/webkit/tools/test_shell/test_navigation_controller.cc
index cf26baf..ff4a753 100644
--- a/webkit/tools/test_shell/test_navigation_controller.cc
+++ b/webkit/tools/test_shell/test_navigation_controller.cc
@@ -5,6 +5,7 @@
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "base/logging.h"
+#include "webkit/glue/webhistoryitem.h"
#include "webkit/tools/test_shell/test_shell.h"
// ----------------------------------------------------------------------------
@@ -28,9 +29,21 @@ TestNavigationEntry::~TestNavigationEntry() {
}
void TestNavigationEntry::SetContentState(const std::string& state) {
+ cached_history_item_ = NULL; // invalidate our cached item
state_ = state;
}
+WebHistoryItem* TestNavigationEntry::GetHistoryItem() const {
+ if (!cached_history_item_) {
+ TestShellExtraRequestData* extra_data =
+ new TestShellExtraRequestData(GetPageID());
+ cached_history_item_ =
+ WebHistoryItem::Create(GetURL(), GetTitle(), GetContentState(),
+ extra_data);
+ }
+ return cached_history_item_;
+}
+
// ----------------------------------------------------------------------------
// TestNavigationController