| 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 <utility> | 5 #include <utility> |
| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 browser(), url2, WindowOpenDisposition::NEW_BACKGROUND_TAB, | 418 browser(), url2, WindowOpenDisposition::NEW_BACKGROUND_TAB, |
| 419 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 419 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 420 | 420 |
| 421 std::vector<GURL> urls(GetHistoryContents()); | 421 std::vector<GURL> urls(GetHistoryContents()); |
| 422 ASSERT_EQ(2u, urls.size()); | 422 ASSERT_EQ(2u, urls.size()); |
| 423 ASSERT_EQ(url2, urls[0]); | 423 ASSERT_EQ(url2, urls[0]); |
| 424 ASSERT_EQ(url1, urls[1]); | 424 ASSERT_EQ(url1, urls[1]); |
| 425 | 425 |
| 426 content::WebContents* tab = | 426 content::WebContents* tab = |
| 427 browser()->tab_strip_model()->GetActiveWebContents(); | 427 browser()->tab_strip_model()->GetActiveWebContents(); |
| 428 tab->GetController().Reload(false); | 428 tab->GetController().Reload(content::ReloadType::NORMAL, false); |
| 429 content::WaitForLoadStop(tab); | 429 content::WaitForLoadStop(tab); |
| 430 | 430 |
| 431 urls = GetHistoryContents(); | 431 urls = GetHistoryContents(); |
| 432 ASSERT_EQ(2u, urls.size()); | 432 ASSERT_EQ(2u, urls.size()); |
| 433 ASSERT_EQ(url1, urls[0]); | 433 ASSERT_EQ(url1, urls[0]); |
| 434 ASSERT_EQ(url2, urls[1]); | 434 ASSERT_EQ(url2, urls[1]); |
| 435 } | 435 } |
| 436 | 436 |
| 437 // Verify that back/forward brings current page to top of history list. | 437 // Verify that back/forward brings current page to top of history list. |
| 438 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, BackForwardBringPageToTop) { | 438 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, BackForwardBringPageToTop) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 508 |
| 509 content::WebContents* active_web_contents = | 509 content::WebContents* active_web_contents = |
| 510 browser()->tab_strip_model()->GetActiveWebContents(); | 510 browser()->tab_strip_model()->GetActiveWebContents(); |
| 511 ASSERT_EQ(web_contents, active_web_contents); | 511 ASSERT_EQ(web_contents, active_web_contents); |
| 512 ASSERT_EQ(history_url, active_web_contents->GetURL()); | 512 ASSERT_EQ(history_url, active_web_contents->GetURL()); |
| 513 | 513 |
| 514 content::WebContents* second_tab = | 514 content::WebContents* second_tab = |
| 515 browser()->tab_strip_model()->GetWebContentsAt(1); | 515 browser()->tab_strip_model()->GetWebContentsAt(1); |
| 516 ASSERT_NE(history_url, second_tab->GetURL()); | 516 ASSERT_NE(history_url, second_tab->GetURL()); |
| 517 } | 517 } |
| OLD | NEW |