OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/format_macros.h" | 5 #include "base/format_macros.h" |
6 #include "base/string_util.h" | 6 #include "base/stringprintf.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/autocomplete/autocomplete.h" | 8 #include "chrome/browser/autocomplete/autocomplete.h" |
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 9 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
11 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 11 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
13 #include "chrome/browser/tabs/tab_strip_model.h" | 13 #include "chrome/browser/tabs/tab_strip_model.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/browser/ui/omnibox/location_bar.h" | 16 #include "chrome/browser/ui/omnibox/location_bar.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 EXPECT_EQ(ASCIIToUTF16(" ?foo"), | 241 EXPECT_EQ(ASCIIToUTF16(" ?foo"), |
242 location_bar->location_entry()->GetText()); | 242 location_bar->location_entry()->GetText()); |
243 | 243 |
244 size_t selection_start, selection_end; | 244 size_t selection_start, selection_end; |
245 location_bar->location_entry()->GetSelectionBounds(&selection_start, | 245 location_bar->location_entry()->GetSelectionBounds(&selection_start, |
246 &selection_end); | 246 &selection_end); |
247 EXPECT_EQ(4U, std::min(selection_start, selection_end)); | 247 EXPECT_EQ(4U, std::min(selection_start, selection_end)); |
248 EXPECT_EQ(7U, std::max(selection_start, selection_end)); | 248 EXPECT_EQ(7U, std::max(selection_start, selection_end)); |
249 } | 249 } |
250 } | 250 } |
OLD | NEW |