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/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const wchar_t kSearchKeywordKeys[] = { ui::VKEY_F, ui::VKEY_O, ui::VKEY_O, 0 }; | 61 const wchar_t kSearchKeywordKeys[] = { ui::VKEY_F, ui::VKEY_O, ui::VKEY_O, 0 }; |
62 const char kSearchURL[] = "http://www.foo.com/search?q={searchTerms}"; | 62 const char kSearchURL[] = "http://www.foo.com/search?q={searchTerms}"; |
63 const char kSearchShortName[] = "foo"; | 63 const char kSearchShortName[] = "foo"; |
64 const char kSearchText[] = "abc"; | 64 const char kSearchText[] = "abc"; |
65 const wchar_t kSearchTextKeys[] = { ui::VKEY_A, ui::VKEY_B, ui::VKEY_C, 0 }; | 65 const wchar_t kSearchTextKeys[] = { ui::VKEY_A, ui::VKEY_B, ui::VKEY_C, 0 }; |
66 const char kSearchTextURL[] = "http://www.foo.com/search?q=abc"; | 66 const char kSearchTextURL[] = "http://www.foo.com/search?q=abc"; |
67 const char kSearchSingleChar[] = "z"; | 67 const char kSearchSingleChar[] = "z"; |
68 const wchar_t kSearchSingleCharKeys[] = { ui::VKEY_Z, 0 }; | 68 const wchar_t kSearchSingleCharKeys[] = { ui::VKEY_Z, 0 }; |
69 const char kSearchSingleCharURL[] = "http://www.foo.com/search?q=z"; | 69 const char kSearchSingleCharURL[] = "http://www.foo.com/search?q=z"; |
70 | 70 |
71 const char kHistoryPageURL[] = "chrome://history/#q=abc"; | |
72 | |
73 const char kDesiredTLDHostname[] = "www.bar.com"; | 71 const char kDesiredTLDHostname[] = "www.bar.com"; |
74 const wchar_t kDesiredTLDKeys[] = { ui::VKEY_B, ui::VKEY_A, ui::VKEY_R, 0 }; | 72 const wchar_t kDesiredTLDKeys[] = { ui::VKEY_B, ui::VKEY_A, ui::VKEY_R, 0 }; |
75 | 73 |
76 const char kInlineAutocompleteText[] = "def"; | 74 const char kInlineAutocompleteText[] = "def"; |
77 const wchar_t kInlineAutocompleteTextKeys[] = { | 75 const wchar_t kInlineAutocompleteTextKeys[] = { |
78 ui::VKEY_D, ui::VKEY_E, ui::VKEY_F, 0 | 76 ui::VKEY_D, ui::VKEY_E, ui::VKEY_F, 0 |
79 }; | 77 }; |
80 | 78 |
81 // Hostnames that shall be blocked by host resolver. | 79 // Hostnames that shall be blocked by host resolver. |
82 const char *kBlockedHostnames[] = { | 80 const char *kBlockedHostnames[] = { |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 omnibox_view->Update(); | 1850 omnibox_view->Update(); |
1853 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1851 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1854 } | 1852 } |
1855 | 1853 |
1856 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, InputResetsSearchTermReplacement) { | 1854 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, InputResetsSearchTermReplacement) { |
1857 browser()->toolbar_model()->set_search_term_replacement_enabled(false); | 1855 browser()->toolbar_model()->set_search_term_replacement_enabled(false); |
1858 chrome::FocusLocationBar(browser()); | 1856 chrome::FocusLocationBar(browser()); |
1859 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, 0)); | 1857 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, 0)); |
1860 EXPECT_TRUE(browser()->toolbar_model()->search_term_replacement_enabled()); | 1858 EXPECT_TRUE(browser()->toolbar_model()->search_term_replacement_enabled()); |
1861 } | 1859 } |
OLD | NEW |