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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Even after navigate completes, the currently-active tab title is | 487 // Even after navigate completes, the currently-active tab title is |
488 // 'Loading...' for a brief time while the history page loads. | 488 // 'Loading...' for a brief time while the history page loads. |
489 content::WebContents* web_contents = | 489 content::WebContents* web_contents = |
490 browser()->tab_strip_model()->GetActiveWebContents(); | 490 browser()->tab_strip_model()->GetActiveWebContents(); |
491 base::string16 expected_title(base::ASCIIToUTF16("History")); | 491 base::string16 expected_title(base::ASCIIToUTF16("History")); |
492 content::TitleWatcher title_watcher(web_contents, expected_title); | 492 content::TitleWatcher title_watcher(web_contents, expected_title); |
493 chrome::ExecuteCommand(browser(), IDC_SHOW_HISTORY); | 493 chrome::ExecuteCommand(browser(), IDC_SHOW_HISTORY); |
494 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 494 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
495 | 495 |
496 ui_test_utils::NavigateToURLWithDisposition( | 496 ui_test_utils::NavigateToURLWithDisposition( |
497 browser(), GURL(content::kAboutBlankURL), NEW_FOREGROUND_TAB, | 497 browser(), |
| 498 GURL(url::kAboutBlankURL), |
| 499 NEW_FOREGROUND_TAB, |
498 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 500 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
499 chrome::ExecuteCommand(browser(), IDC_SHOW_HISTORY); | 501 chrome::ExecuteCommand(browser(), IDC_SHOW_HISTORY); |
500 | 502 |
501 content::WebContents* active_web_contents = | 503 content::WebContents* active_web_contents = |
502 browser()->tab_strip_model()->GetActiveWebContents(); | 504 browser()->tab_strip_model()->GetActiveWebContents(); |
503 ASSERT_EQ(web_contents, active_web_contents); | 505 ASSERT_EQ(web_contents, active_web_contents); |
504 ASSERT_EQ(history_url, active_web_contents->GetURL()); | 506 ASSERT_EQ(history_url, active_web_contents->GetURL()); |
505 | 507 |
506 content::WebContents* second_tab = | 508 content::WebContents* second_tab = |
507 browser()->tab_strip_model()->GetWebContentsAt(1); | 509 browser()->tab_strip_model()->GetWebContentsAt(1); |
508 ASSERT_NE(history_url, second_tab->GetURL()); | 510 ASSERT_NE(history_url, second_tab->GetURL()); |
509 } | 511 } |
OLD | NEW |