Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Unified Diff: content/browser/tab_contents/test_tab_contents.cc

Issue 7649009: Merge of 97624 to 835 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tab_contents/test_tab_contents.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/test_tab_contents.cc
===================================================================
--- content/browser/tab_contents/test_tab_contents.cc (revision 96734)
+++ content/browser/tab_contents/test_tab_contents.cc (working copy)
@@ -16,9 +16,16 @@
TestTabContents::TestTabContents(Profile* profile, SiteInstance* instance)
: TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL),
transition_cross_site(false),
- delegate_view_override_(NULL) {
+ delegate_view_override_(NULL),
+ expect_set_history_length_and_prune_(false),
+ expect_set_history_length_and_prune_site_instance_(NULL),
+ expect_set_history_length_and_prune_history_length_(0),
+ expect_set_history_length_and_prune_min_page_id_(-1) {
}
+TestTabContents::~TestTabContents() {
+}
+
TestRenderViewHost* TestTabContents::pending_rvh() const {
return static_cast<TestRenderViewHost*>(
render_manager_.pending_render_view_host_);
@@ -89,3 +96,23 @@
return delegate_view_override_;
return TabContents::GetViewDelegate();
}
+
+void TestTabContents::ExpectSetHistoryLengthAndPrune(
+ const SiteInstance* site_instance,
+ int history_length,
+ int32 min_page_id) {
+ expect_set_history_length_and_prune_ = true;
+ expect_set_history_length_and_prune_site_instance_ = site_instance;
+ expect_set_history_length_and_prune_history_length_ = history_length;
+ expect_set_history_length_and_prune_min_page_id_ = min_page_id;
+}
+
+void TestTabContents::SetHistoryLengthAndPrune(
+ const SiteInstance* site_instance, int history_length, int32 min_page_id) {
+ EXPECT_TRUE(expect_set_history_length_and_prune_);
+ expect_set_history_length_and_prune_ = false;
+ EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance);
+ EXPECT_EQ(expect_set_history_length_and_prune_history_length_,
+ history_length);
+ EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id);
+}
« no previous file with comments | « content/browser/tab_contents/test_tab_contents.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698