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

Unified Diff: chrome/browser/prerender/prerender_unittest.cc

Issue 10918189: Add PrerenderStatusEvent on Prerenders (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase to trunk, remove some unrelated fixes... Created 8 years, 1 month 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 | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/common/prerender_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_unittest.cc
diff --git a/chrome/browser/prerender/prerender_unittest.cc b/chrome/browser/prerender/prerender_unittest.cc
index a839fed69843bab28640dfbe934ada0652712757..fd3f2a24cafaee36fe6c23158a015a68d0300ac7 100644
--- a/chrome/browser/prerender/prerender_unittest.cc
+++ b/chrome/browser/prerender/prerender_unittest.cc
@@ -47,6 +47,7 @@ class DummyPrerenderContents : public PrerenderContents {
virtual void StartPrerendering(
int ALLOW_UNUSED creator_child_id,
+ int ALLOW_UNUSED prerender_id,
const gfx::Size& ALLOW_UNUSED size,
content::SessionStorageNamespace* ALLOW_UNUSED session_storage_namespace,
bool is_control_group) OVERRIDE;
@@ -242,6 +243,7 @@ DummyPrerenderContents::DummyPrerenderContents(
void DummyPrerenderContents::StartPrerendering(
int ALLOW_UNUSED creator_child_id,
+ int ALLOW_UNUSED prerender_id,
const gfx::Size& ALLOW_UNUSED size,
content::SessionStorageNamespace* ALLOW_UNUSED session_storage_namespace,
bool is_control_group) {
@@ -257,6 +259,7 @@ void DummyPrerenderContents::StartPrerendering(
class PrerenderTest : public testing::Test {
public:
static const int kDefaultChildId = -1;
+ static const int kDefaultPrerenderId = -1;
static const int kDefaultRenderViewRouteId = -1;
PrerenderTest() : ui_thread_(BrowserThread::UI, &message_loop_),
@@ -339,7 +342,7 @@ TEST_F(PrerenderTest, DuplicateTest) {
scoped_ptr<PrerenderHandle> duplicate_prerender_handle(
prerender_manager()->AddPrerenderFromLinkRelPrerender(
- kDefaultChildId, kDefaultRenderViewRouteId, url,
+ kDefaultChildId, kDefaultPrerenderId, kDefaultRenderViewRouteId, url,
Referrer(url, WebKit::WebReferrerPolicyDefault), kSize));
EXPECT_TRUE(duplicate_prerender_handle->IsValid());
@@ -626,7 +629,7 @@ TEST_F(PrerenderTest, PendingPrerenderTest) {
FINAL_STATUS_USED);
scoped_ptr<PrerenderHandle> pending_prerender_handle(
prerender_manager()->AddPrerenderFromLinkRelPrerender(
- child_id, route_id, pending_url,
+ child_id, kDefaultPrerenderId, route_id, pending_url,
Referrer(url, WebKit::WebReferrerPolicyDefault), kSize));
DCHECK(pending_prerender_handle.get());
EXPECT_TRUE(pending_prerender_handle->IsValid());
@@ -663,7 +666,7 @@ TEST_F(PrerenderTest, InvalidPendingPrerenderTest) {
FINAL_STATUS_UNSUPPORTED_SCHEME);
scoped_ptr<PrerenderHandle> pending_prerender_handle(
prerender_manager()->AddPrerenderFromLinkRelPrerender(
- child_id, route_id, pending_url,
+ child_id, kDefaultPrerenderId, route_id, pending_url,
Referrer(url, WebKit::WebReferrerPolicyDefault), kSize));
DCHECK(pending_prerender_handle.get());
EXPECT_TRUE(pending_prerender_handle->IsValid());
@@ -693,7 +696,7 @@ TEST_F(PrerenderTest, CancelPendingPrerenderTest) {
scoped_ptr<PrerenderHandle> pending_prerender_handle(
prerender_manager()->AddPrerenderFromLinkRelPrerender(
- child_id, route_id, pending_url,
+ child_id, kDefaultPrerenderId, route_id, pending_url,
Referrer(url, WebKit::WebReferrerPolicyDefault), kSize));
DCHECK(pending_prerender_handle.get());
EXPECT_TRUE(pending_prerender_handle->IsValid());
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/common/prerender_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698