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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 "behavior = 1;")); | 1269 "behavior = 1;")); |
1270 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("exa")); | 1270 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("exa")); |
1271 EXPECT_EQ(ASCIIToUTF16("example.com"), omnibox()->GetText()); | 1271 EXPECT_EQ(ASCIIToUTF16("example.com"), omnibox()->GetText()); |
1272 SetOmniboxText("exam"); | 1272 SetOmniboxText("exam"); |
1273 EXPECT_EQ(ASCIIToUTF16("example.com"), omnibox()->GetText()); | 1273 EXPECT_EQ(ASCIIToUTF16("example.com"), omnibox()->GetText()); |
1274 | 1274 |
1275 // TODO(jered): Remove this after fixing OnBlur(). | 1275 // TODO(jered): Remove this after fixing OnBlur(). |
1276 omnibox()->RevertAll(); | 1276 omnibox()->RevertAll(); |
1277 } | 1277 } |
1278 | 1278 |
1279 // TODO(dhollowa): Fix flakes. http://crbug.com/179930. | 1279 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, MostVisited) { |
1280 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, DISABLED_MostVisited) { | |
1281 content::WindowedNotificationObserver observer( | 1280 content::WindowedNotificationObserver observer( |
1282 chrome::NOTIFICATION_INSTANT_SENT_MOST_VISITED_ITEMS, | 1281 chrome::NOTIFICATION_INSTANT_SENT_MOST_VISITED_ITEMS, |
1283 content::NotificationService::AllSources()); | 1282 content::NotificationService::AllSources()); |
1284 // Initialize Instant. | 1283 // Initialize Instant. |
1285 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 1284 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
1286 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); | 1285 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); |
1287 | 1286 |
1288 // Get a handle to the NTP and the current state of the JS. | 1287 // Get a handle to the NTP and the current state of the JS. |
1289 ASSERT_NE(static_cast<InstantNTP*>(NULL), instant()->ntp()); | 1288 ASSERT_NE(static_cast<InstantNTP*>(NULL), instant()->ntp()); |
1290 content::WebContents* overlay = instant()->ntp_->contents(); | 1289 content::WebContents* overlay = instant()->ntp_->contents(); |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 GURL(chrome::kChromeUINewTabURL), | 2709 GURL(chrome::kChromeUINewTabURL), |
2711 NEW_FOREGROUND_TAB, | 2710 NEW_FOREGROUND_TAB, |
2712 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); | 2711 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); |
2713 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_OEM_PERIOD, | 2712 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_OEM_PERIOD, |
2714 true, true, false, false)); | 2713 true, true, false, false)); |
2715 EXPECT_TRUE(UpdateSearchState(instant()->instant_tab()->contents())); | 2714 EXPECT_TRUE(UpdateSearchState(instant()->instant_tab()->contents())); |
2716 EXPECT_EQ(1, on_toggle_voice_search_calls_); | 2715 EXPECT_EQ(1, on_toggle_voice_search_calls_); |
2717 } | 2716 } |
2718 | 2717 |
2719 #endif // HTML_INSTANT_EXTENDED_POPUP | 2718 #endif // HTML_INSTANT_EXTENDED_POPUP |
OLD | NEW |