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/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 browser()->toolbar_model()->set_url_replacement_enabled(false); | 1839 browser()->toolbar_model()->set_url_replacement_enabled(false); |
1840 test_toolbar_model->set_text(url_b); | 1840 test_toolbar_model->set_text(url_b); |
1841 omnibox_view->Update(); | 1841 omnibox_view->Update(); |
1842 EXPECT_EQ(url_a, omnibox_view->GetText()); | 1842 EXPECT_EQ(url_a, omnibox_view->GetText()); |
1843 omnibox_view->RevertAll(); | 1843 omnibox_view->RevertAll(); |
1844 EXPECT_EQ(url_b, omnibox_view->GetText()); | 1844 EXPECT_EQ(url_b, omnibox_view->GetText()); |
1845 test_toolbar_model->set_text(url_c); | 1845 test_toolbar_model->set_text(url_c); |
1846 omnibox_view->Update(); | 1846 omnibox_view->Update(); |
1847 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1847 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1848 } | 1848 } |
1849 | |
1850 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { | |
1851 browser()->toolbar_model()->set_url_replacement_enabled(true); | |
1852 chrome::FocusLocationBar(browser()); | |
1853 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); | |
1854 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); | |
1855 } | |
OLD | NEW |