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/command_line.h" | 7 #include "base/command_line.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 27 matching lines...) Expand all Loading... |
38 #include "components/bookmarks/test/bookmark_test_helpers.h" | 38 #include "components/bookmarks/test/bookmark_test_helpers.h" |
39 #include "components/search_engines/template_url.h" | 39 #include "components/search_engines/template_url.h" |
40 #include "components/search_engines/template_url_service.h" | 40 #include "components/search_engines/template_url_service.h" |
41 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
42 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
43 #include "net/dns/mock_host_resolver.h" | 43 #include "net/dns/mock_host_resolver.h" |
44 #include "ui/base/clipboard/clipboard.h" | 44 #include "ui/base/clipboard/clipboard.h" |
45 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 45 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
46 #include "ui/events/event_constants.h" | 46 #include "ui/events/event_constants.h" |
47 #include "ui/events/keycodes/keyboard_codes.h" | 47 #include "ui/events/keycodes/keyboard_codes.h" |
48 #include "ui/gfx/point.h" | 48 #include "ui/gfx/geometry/point.h" |
49 | 49 |
50 using base::ASCIIToUTF16; | 50 using base::ASCIIToUTF16; |
51 using base::UTF16ToUTF8; | 51 using base::UTF16ToUTF8; |
52 using base::Time; | 52 using base::Time; |
53 using base::TimeDelta; | 53 using base::TimeDelta; |
54 | 54 |
55 namespace { | 55 namespace { |
56 | 56 |
57 const char kSearchKeyword[] = "foo"; | 57 const char kSearchKeyword[] = "foo"; |
58 const char kSearchKeyword2[] = "footest.com"; | 58 const char kSearchKeyword2[] = "footest.com"; |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 omnibox_view->Update(); | 1786 omnibox_view->Update(); |
1787 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1787 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1788 } | 1788 } |
1789 | 1789 |
1790 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { | 1790 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { |
1791 browser()->toolbar_model()->set_url_replacement_enabled(true); | 1791 browser()->toolbar_model()->set_url_replacement_enabled(true); |
1792 chrome::FocusLocationBar(browser()); | 1792 chrome::FocusLocationBar(browser()); |
1793 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); | 1793 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); |
1794 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); | 1794 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); |
1795 } | 1795 } |
OLD | NEW |