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

Unified Diff: content/test/test_web_contents.cc

Issue 743803002: Avoid stale navigation requests without excessive page id knowledge in the renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years 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/test/test_web_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 5d46f61acd3f5eec56f2894790a13881cc899ebe..e4f4846f67b1e909fa6168de59350f80d62a87f6 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -33,10 +33,8 @@ namespace content {
TestWebContents::TestWebContents(BrowserContext* browser_context)
: WebContentsImpl(browser_context, 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) {
+ expect_set_history_offset_and_length_(false),
+ expect_set_history_offset_and_length_history_length_(0) {
}
TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
@@ -47,7 +45,7 @@ TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
}
TestWebContents::~TestWebContents() {
- EXPECT_FALSE(expect_set_history_length_and_prune_);
+ EXPECT_FALSE(expect_set_history_offset_and_length_);
}
TestRenderFrameHost* TestWebContents::GetMainFrame() {
@@ -217,27 +215,21 @@ void TestWebContents::AddPendingContents(TestWebContents* contents) {
AddDestructionObserver(contents);
}
-void TestWebContents::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_ =
- static_cast<const SiteInstanceImpl*>(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 TestWebContents::ExpectSetHistoryOffsetAndLength(int history_offset,
+ int history_length) {
+ expect_set_history_offset_and_length_ = true;
+ expect_set_history_offset_and_length_history_offset_ = history_offset;
+ expect_set_history_offset_and_length_history_length_ = history_length;
}
-void TestWebContents::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_.get(),
- site_instance);
- EXPECT_EQ(expect_set_history_length_and_prune_history_length_,
+void TestWebContents::SetHistoryOffsetAndLength(int history_offset,
+ int history_length) {
+ EXPECT_TRUE(expect_set_history_offset_and_length_);
+ expect_set_history_offset_and_length_ = false;
+ EXPECT_EQ(expect_set_history_offset_and_length_history_offset_,
+ history_offset);
+ EXPECT_EQ(expect_set_history_offset_and_length_history_length_,
history_length);
- EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id);
}
void TestWebContents::TestDidFinishLoad(const GURL& url) {
« no previous file with comments | « content/test/test_web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698