| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/metrics/histogram_base.h" | 9 #include "base/metrics/histogram_base.h" |
| 10 #include "base/metrics/histogram_samples.h" | 10 #include "base/metrics/histogram_samples.h" |
| (...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 active_tab->GetController().GoForward(); | 1575 active_tab->GetController().GoForward(); |
| 1576 load_stop_observer_2.Wait(); | 1576 load_stop_observer_2.Wait(); |
| 1577 | 1577 |
| 1578 // Commit the search by pressing 'Enter'. | 1578 // Commit the search by pressing 'Enter'. |
| 1579 FocusOmnibox(); | 1579 FocusOmnibox(); |
| 1580 EXPECT_EQ(ASCIIToUTF16("cattles"), omnibox()->GetText()); | 1580 EXPECT_EQ(ASCIIToUTF16("cattles"), omnibox()->GetText()); |
| 1581 PressEnterAndWaitForNavigation(); | 1581 PressEnterAndWaitForNavigation(); |
| 1582 EXPECT_EQ(ASCIIToUTF16("cattles"), omnibox()->GetText()); | 1582 EXPECT_EQ(ASCIIToUTF16("cattles"), omnibox()->GetText()); |
| 1583 } | 1583 } |
| 1584 | 1584 |
| 1585 // Flaky on Mac Tests bot. | 1585 // Flaky on all bots since re-enabled in r208032, crbug.com/253092 |
| 1586 #if defined(OS_MACOSX) | 1586 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, DISABLED_NavigateBackToNTP) { |
| 1587 #define MAYBE_NavigateBackToNTP DISABLED_NavigateBackToNTP | |
| 1588 #else | |
| 1589 #define MAYBE_NavigateBackToNTP NavigateBackToNTP | |
| 1590 #endif | |
| 1591 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, MAYBE_NavigateBackToNTP) { | |
| 1592 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 1587 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
| 1593 FocusOmniboxAndWaitForInstantNTPSupport(); | 1588 FocusOmniboxAndWaitForInstantNTPSupport(); |
| 1594 | 1589 |
| 1595 // Open a new tab page. | 1590 // Open a new tab page. |
| 1596 ui_test_utils::NavigateToURLWithDisposition( | 1591 ui_test_utils::NavigateToURLWithDisposition( |
| 1597 browser(), | 1592 browser(), |
| 1598 GURL(chrome::kChromeUINewTabURL), | 1593 GURL(chrome::kChromeUINewTabURL), |
| 1599 NEW_FOREGROUND_TAB, | 1594 NEW_FOREGROUND_TAB, |
| 1600 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); | 1595 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); |
| 1601 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 1596 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 content::WindowedNotificationObserver load_stop_observer_2( | 1632 content::WindowedNotificationObserver load_stop_observer_2( |
| 1638 content::NOTIFICATION_LOAD_STOP, | 1633 content::NOTIFICATION_LOAD_STOP, |
| 1639 content::Source<content::NavigationController>( | 1634 content::Source<content::NavigationController>( |
| 1640 &active_tab->GetController())); | 1635 &active_tab->GetController())); |
| 1641 active_tab->GetController().GoBack(); | 1636 active_tab->GetController().GoBack(); |
| 1642 load_stop_observer_2.Wait(); | 1637 load_stop_observer_2.Wait(); |
| 1643 | 1638 |
| 1644 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); | 1639 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 1645 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); | 1640 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); |
| 1646 } | 1641 } |
| OLD | NEW |