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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 10933065: Separate same domain and cross domain <link rel=...> prerenders for reporting. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix rebase... Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 TestPrerenderContents( 133 TestPrerenderContents(
134 PrerenderManager* prerender_manager, 134 PrerenderManager* prerender_manager,
135 PrerenderTracker* prerender_tracker, 135 PrerenderTracker* prerender_tracker,
136 Profile* profile, 136 Profile* profile,
137 const GURL& url, 137 const GURL& url,
138 const content::Referrer& referrer, 138 const content::Referrer& referrer,
139 int expected_number_of_loads, 139 int expected_number_of_loads,
140 FinalStatus expected_final_status, 140 FinalStatus expected_final_status,
141 bool prerender_should_wait_for_ready_title) 141 bool prerender_should_wait_for_ready_title)
142 : PrerenderContents(prerender_manager, prerender_tracker, 142 : PrerenderContents(prerender_manager, prerender_tracker,
143 profile, url, referrer, ORIGIN_LINK_REL_PRERENDER, 143 profile, url, referrer,
144 ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN,
144 PrerenderManager::kNoExperiment), 145 PrerenderManager::kNoExperiment),
145 number_of_loads_(0), 146 number_of_loads_(0),
146 expected_number_of_loads_(expected_number_of_loads), 147 expected_number_of_loads_(expected_number_of_loads),
147 expected_final_status_(expected_final_status), 148 expected_final_status_(expected_final_status),
148 new_render_view_host_(NULL), 149 new_render_view_host_(NULL),
149 was_hidden_(false), 150 was_hidden_(false),
150 was_shown_(false), 151 was_shown_(false),
151 should_be_shown_(expected_final_status == FINAL_STATUS_USED), 152 should_be_shown_(expected_final_status == FINAL_STATUS_USED),
152 quit_message_loop_on_destruction_( 153 quit_message_loop_on_destruction_(
153 expected_final_status != FINAL_STATUS_EVICTED && 154 expected_final_status != FINAL_STATUS_EVICTED &&
(...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 ResultCatcher catcher; 2420 ResultCatcher catcher;
2420 2421
2421 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); 2422 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1);
2422 NavigateToDestURL(); 2423 NavigateToDestURL();
2423 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); 2424 ASSERT_TRUE(IsEmptyPrerenderLinkManager());
2424 2425
2425 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 2426 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
2426 } 2427 }
2427 2428
2428 } // namespace prerender 2429 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | chrome/browser/prerender/prerender_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698