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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 {"http://www.def.com", "Page def", 10000, 10000, true }, | 117 {"http://www.def.com", "Page def", 10000, 10000, true }, |
118 | 118 |
119 // Used in particular for the desired TLD test. This makes it test | 119 // Used in particular for the desired TLD test. This makes it test |
120 // the interesting case when there's an intranet host with the same | 120 // the interesting case when there's an intranet host with the same |
121 // name as the .com. | 121 // name as the .com. |
122 {"http://bar/", "Bar", 1, 0, false }, | 122 {"http://bar/", "Bar", 1, 0, false }, |
123 }; | 123 }; |
124 | 124 |
125 // Stores the given text to clipboard. | 125 // Stores the given text to clipboard. |
126 void SetClipboardText(const base::string16& text) { | 126 void SetClipboardText(const base::string16& text) { |
127 ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); | 127 ui::ScopedClipboardWriter writer(ui::CLIPBOARD_TYPE_COPY_PASTE); |
128 ui::ScopedClipboardWriter writer(clipboard, ui::CLIPBOARD_TYPE_COPY_PASTE); | |
129 writer.WriteText(text); | 128 writer.WriteText(text); |
130 } | 129 } |
131 | 130 |
132 #if defined(OS_MACOSX) | 131 #if defined(OS_MACOSX) |
133 const int kCtrlOrCmdMask = ui::EF_COMMAND_DOWN; | 132 const int kCtrlOrCmdMask = ui::EF_COMMAND_DOWN; |
134 #else | 133 #else |
135 const int kCtrlOrCmdMask = ui::EF_CONTROL_DOWN; | 134 const int kCtrlOrCmdMask = ui::EF_CONTROL_DOWN; |
136 #endif | 135 #endif |
137 | 136 |
138 } // namespace | 137 } // namespace |
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 omnibox_view->Update(); | 1799 omnibox_view->Update(); |
1801 EXPECT_EQ(url_c, omnibox_view->GetText()); | 1800 EXPECT_EQ(url_c, omnibox_view->GetText()); |
1802 } | 1801 } |
1803 | 1802 |
1804 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { | 1803 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, EscDisablesSearchTermReplacement) { |
1805 browser()->toolbar_model()->set_url_replacement_enabled(true); | 1804 browser()->toolbar_model()->set_url_replacement_enabled(true); |
1806 chrome::FocusLocationBar(browser()); | 1805 chrome::FocusLocationBar(browser()); |
1807 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); | 1806 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, 0)); |
1808 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); | 1807 EXPECT_FALSE(browser()->toolbar_model()->url_replacement_enabled()); |
1809 } | 1808 } |
OLD | NEW |