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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 // Move the cursor to the end. | 1456 // Move the cursor to the end. |
1457 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, 0)); | 1457 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, 0)); |
1458 | 1458 |
1459 // Backspace should delete one character. | 1459 // Backspace should delete one character. |
1460 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0)); | 1460 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, 0)); |
1461 EXPECT_EQ(base::UTF8ToUTF16("\357\276\200"), omnibox_view->GetText()); | 1461 EXPECT_EQ(base::UTF8ToUTF16("\357\276\200"), omnibox_view->GetText()); |
1462 } | 1462 } |
1463 #endif // defined(TOOLKIT_GTK) || defined(TOOLKIT_VIEWS) | 1463 #endif // defined(TOOLKIT_GTK) || defined(TOOLKIT_VIEWS) |
1464 | 1464 |
1465 // Flaky test. crbug.com/356850 | 1465 // Flaky test. crbug.com/356850 |
1466 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, FLAKY_DoesNotUpdateAutocompleteOnBlur) { | 1466 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, |
| 1467 DISABLED_DoesNotUpdateAutocompleteOnBlur) { |
1467 OmniboxView* omnibox_view = NULL; | 1468 OmniboxView* omnibox_view = NULL; |
1468 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); | 1469 ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); |
1469 OmniboxPopupModel* popup_model = omnibox_view->model()->popup_model(); | 1470 OmniboxPopupModel* popup_model = omnibox_view->model()->popup_model(); |
1470 ASSERT_TRUE(popup_model); | 1471 ASSERT_TRUE(popup_model); |
1471 | 1472 |
1472 // Input something to trigger inline autocomplete. | 1473 // Input something to trigger inline autocomplete. |
1473 ASSERT_NO_FATAL_FAILURE(SendKeySequence(kInlineAutocompleteTextKeys)); | 1474 ASSERT_NO_FATAL_FAILURE(SendKeySequence(kInlineAutocompleteTextKeys)); |
1474 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); | 1475 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); |
1475 ASSERT_TRUE(popup_model->IsOpen()); | 1476 ASSERT_TRUE(popup_model->IsOpen()); |
1476 size_t start, end; | 1477 size_t start, end; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1830 omnibox_view->Update(); | 1831 omnibox_view->Update(); |
1831 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1832 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1832 } | 1833 } |
1833 | 1834 |
1834 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, InputResetsSearchTermReplacement) { | 1835 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, InputResetsSearchTermReplacement) { |
1835 browser()->toolbar_model()->set_url_replacement_enabled(false); | 1836 browser()->toolbar_model()->set_url_replacement_enabled(false); |
1836 chrome::FocusLocationBar(browser()); | 1837 chrome::FocusLocationBar(browser()); |
1837 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, 0)); | 1838 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, 0)); |
1838 EXPECT_TRUE(browser()->toolbar_model()->url_replacement_enabled()); | 1839 EXPECT_TRUE(browser()->toolbar_model()->url_replacement_enabled()); |
1839 } | 1840 } |
OLD | NEW |