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 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2597 // Flaky: http://crbug.com/238863 | 2597 // Flaky: http://crbug.com/238863 |
2598 IN_PROC_BROWSER_TEST_F( | 2598 IN_PROC_BROWSER_TEST_F( |
2599 InstantExtendedFirstTabTest, DISABLED_RedirectToLocalOnLoadFailure) { | 2599 InstantExtendedFirstTabTest, DISABLED_RedirectToLocalOnLoadFailure) { |
2600 // Create a new window to test the first NTP load. | 2600 // Create a new window to test the first NTP load. |
2601 ui_test_utils::NavigateToURLWithDisposition( | 2601 ui_test_utils::NavigateToURLWithDisposition( |
2602 browser(), | 2602 browser(), |
2603 GURL(chrome::kChromeUINewTabURL), | 2603 GURL(chrome::kChromeUINewTabURL), |
2604 NEW_WINDOW, | 2604 NEW_WINDOW, |
2605 ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER); | 2605 ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER); |
2606 | 2606 |
2607 const BrowserList* native_browser_list = BrowserList::GetInstance( | 2607 const BrowserList* browser_list = BrowserList::GetInstance( |
2608 chrome::HOST_DESKTOP_TYPE_NATIVE); | 2608 chrome::GetActiveDesktop()); |
2609 ASSERT_EQ(2u, native_browser_list->size()); | 2609 ASSERT_EQ(2u, browser_list->size()); |
2610 set_browser(native_browser_list->get(1)); | 2610 set_browser(browser_list->get(1)); |
2611 | 2611 |
2612 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); | 2612 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); |
2613 | 2613 |
2614 // Also make sure our instant_tab_ is loaded. | 2614 // Also make sure our instant_tab_ is loaded. |
2615 if (!instant()->instant_tab_) { | 2615 if (!instant()->instant_tab_) { |
2616 content::WindowedNotificationObserver instant_tab_observer( | 2616 content::WindowedNotificationObserver instant_tab_observer( |
2617 chrome::NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED, | 2617 chrome::NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED, |
2618 content::NotificationService::AllSources()); | 2618 content::NotificationService::AllSources()); |
2619 instant_tab_observer.Wait(); | 2619 instant_tab_observer.Wait(); |
2620 } | 2620 } |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2890 browser()->tab_strip_model()->ActivateTabAt(0, false); | 2890 browser()->tab_strip_model()->ActivateTabAt(0, false); |
2891 | 2891 |
2892 // Switch back to new tab. | 2892 // Switch back to new tab. |
2893 browser()->tab_strip_model()->ActivateTabAt(1, false); | 2893 browser()->tab_strip_model()->ActivateTabAt(1, false); |
2894 | 2894 |
2895 // Confirm that new tab got no onmostvisitedchanged event. | 2895 // Confirm that new tab got no onmostvisitedchanged event. |
2896 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); | 2896 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); |
2897 EXPECT_TRUE(UpdateSearchState(active_tab)); | 2897 EXPECT_TRUE(UpdateSearchState(active_tab)); |
2898 EXPECT_EQ(2, on_most_visited_change_calls_); | 2898 EXPECT_EQ(2, on_most_visited_change_calls_); |
2899 } | 2899 } |
OLD | NEW |