| OLD | NEW |
| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 public: | 206 public: |
| 207 TestPrerenderContents( | 207 TestPrerenderContents( |
| 208 PrerenderManager* prerender_manager, | 208 PrerenderManager* prerender_manager, |
| 209 PrerenderTracker* prerender_tracker, | 209 PrerenderTracker* prerender_tracker, |
| 210 Profile* profile, | 210 Profile* profile, |
| 211 const GURL& url, | 211 const GURL& url, |
| 212 const content::Referrer& referrer, | 212 const content::Referrer& referrer, |
| 213 int expected_number_of_loads, | 213 int expected_number_of_loads, |
| 214 FinalStatus expected_final_status, | 214 FinalStatus expected_final_status, |
| 215 bool prerender_should_wait_for_ready_title) | 215 bool prerender_should_wait_for_ready_title) |
| 216 : PrerenderContents(prerender_manager, prerender_tracker, | 216 : PrerenderContents(prerender_manager, prerender_tracker, profile, url, |
| 217 profile, url, referrer, ORIGIN_LINK_REL_PRERENDER, | 217 referrer, ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN, |
| 218 PrerenderManager::kNoExperiment), | 218 PrerenderManager::kNoExperiment), |
| 219 number_of_loads_(0), | 219 number_of_loads_(0), |
| 220 expected_number_of_loads_(expected_number_of_loads), | 220 expected_number_of_loads_(expected_number_of_loads), |
| 221 expected_final_status_(expected_final_status), | 221 expected_final_status_(expected_final_status), |
| 222 new_render_view_host_(NULL), | 222 new_render_view_host_(NULL), |
| 223 was_hidden_(false), | 223 was_hidden_(false), |
| 224 was_shown_(false), | 224 was_shown_(false), |
| 225 should_be_shown_(expected_final_status == FINAL_STATUS_USED), | 225 should_be_shown_(expected_final_status == FINAL_STATUS_USED), |
| 226 quit_message_loop_on_destruction_( | 226 quit_message_loop_on_destruction_( |
| 227 expected_final_status != FINAL_STATUS_EVICTED && | 227 expected_final_status != FINAL_STATUS_EVICTED && |
| (...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2520 channel_close_watcher.WatchChannel( | 2520 channel_close_watcher.WatchChannel( |
| 2521 chrome::GetActiveWebContents(browser())->GetRenderProcessHost()); | 2521 chrome::GetActiveWebContents(browser())->GetRenderProcessHost()); |
| 2522 NavigateToDestURL(); | 2522 NavigateToDestURL(); |
| 2523 channel_close_watcher.WaitForChannelClose(); | 2523 channel_close_watcher.WaitForChannelClose(); |
| 2524 | 2524 |
| 2525 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); | 2525 ASSERT_TRUE(IsEmptyPrerenderLinkManager()); |
| 2526 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 2526 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 2527 } | 2527 } |
| 2528 | 2528 |
| 2529 } // namespace prerender | 2529 } // namespace prerender |
| OLD | NEW |