Chromium Code Reviews| 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 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3341 1); | 3341 1); |
| 3342 } | 3342 } |
| 3343 | 3343 |
| 3344 // Attempt a swap-in in a new tab, verifying that session storage namespace | 3344 // Attempt a swap-in in a new tab, verifying that session storage namespace |
| 3345 // merging works. | 3345 // merging works. |
| 3346 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPageNewTab) { | 3346 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPageNewTab) { |
| 3347 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | 3347 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); |
| 3348 NavigateToDestURLInNewTab(); | 3348 NavigateToDestURLInNewTab(); |
| 3349 } | 3349 } |
| 3350 | 3350 |
| 3351 // Checks that prerenders honor |should_replace_current_entry|. | |
| 3352 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderReplaceCurrentEntry) { | |
| 3353 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | |
| 3354 | |
| 3355 content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB, | |
| 3356 content::PAGE_TRANSITION_TYPED, false); | |
| 3357 params.should_replace_current_entry = true; | |
| 3358 NavigateToURLWithParams(params, false); | |
| 3359 | |
| 3360 WebContents* web_contents = | |
| 3361 current_browser()->tab_strip_model()->GetActiveWebContents(); | |
| 3362 // First entry is about:blank, second is prerender_page.html. | |
|
Charlie Reis
2013/12/11 02:57:39
Might as well add checks for these specific URLs i
davidben
2013/12/11 21:20:59
Done.
| |
| 3363 EXPECT_EQ(2, web_contents->GetController().GetEntryCount()); | |
| 3364 } | |
| 3365 | |
| 3351 } // namespace prerender | 3366 } // namespace prerender |
| OLD | NEW |