| 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" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
| 14 #include "chrome/browser/autocomplete/history_quick_provider.h" | |
| 15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 14 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/history/history_service_factory.h" | 16 #include "chrome/browser/history/history_service_factory.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 20 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/browser/ui/browser_commands.h" | 20 #include "chrome/browser/ui/browser_commands.h" |
| 22 #include "chrome/browser/ui/browser_window.h" | 21 #include "chrome/browser/ui/browser_window.h" |
| 23 #include "chrome/browser/ui/location_bar/location_bar.h" | 22 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 24 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 23 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 25 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 24 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 26 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 27 #include "chrome/browser/ui/toolbar/test_toolbar_model.h" | 26 #include "chrome/browser/ui/toolbar/test_toolbar_model.h" |
| 28 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
| 29 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/url_constants.h" | 29 #include "chrome/common/url_constants.h" |
| 31 #include "chrome/test/base/in_process_browser_test.h" | 30 #include "chrome/test/base/in_process_browser_test.h" |
| 32 #include "chrome/test/base/interactive_test_utils.h" | 31 #include "chrome/test/base/interactive_test_utils.h" |
| 33 #include "chrome/test/base/ui_test_utils.h" | 32 #include "chrome/test/base/ui_test_utils.h" |
| 34 #include "components/bookmarks/browser/bookmark_model.h" | 33 #include "components/bookmarks/browser/bookmark_model.h" |
| 35 #include "components/bookmarks/browser/bookmark_utils.h" | 34 #include "components/bookmarks/browser/bookmark_utils.h" |
| 36 #include "components/bookmarks/test/bookmark_test_helpers.h" | 35 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 37 #include "components/history/core/browser/history_service.h" | 36 #include "components/history/core/browser/history_service.h" |
| 38 #include "components/history/core/browser/history_service_observer.h" | 37 #include "components/history/core/browser/history_service_observer.h" |
| 39 #include "components/omnibox/autocomplete_input.h" | 38 #include "components/omnibox/autocomplete_input.h" |
| 40 #include "components/omnibox/autocomplete_match.h" | 39 #include "components/omnibox/autocomplete_match.h" |
| 40 #include "components/omnibox/history_quick_provider.h" |
| 41 #include "components/search_engines/template_url.h" | 41 #include "components/search_engines/template_url.h" |
| 42 #include "components/search_engines/template_url_service.h" | 42 #include "components/search_engines/template_url_service.h" |
| 43 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
| 44 #include "content/public/browser/web_contents.h" | 44 #include "content/public/browser/web_contents.h" |
| 45 #include "net/dns/mock_host_resolver.h" | 45 #include "net/dns/mock_host_resolver.h" |
| 46 #include "ui/base/clipboard/clipboard.h" | 46 #include "ui/base/clipboard/clipboard.h" |
| 47 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 47 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 48 #include "ui/events/event_constants.h" | 48 #include "ui/events/event_constants.h" |
| 49 #include "ui/events/keycodes/keyboard_codes.h" | 49 #include "ui/events/keycodes/keyboard_codes.h" |
| 50 #include "ui/gfx/geometry/point.h" | 50 #include "ui/gfx/geometry/point.h" |
| (...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 | 1954 |
| 1955 // Now Shift+Right should do nothing, and Shift+Left should reduce. | 1955 // Now Shift+Right should do nothing, and Shift+Left should reduce. |
| 1956 // At the end, so Shift+Right should do nothing. | 1956 // At the end, so Shift+Right should do nothing. |
| 1957 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RIGHT, ui::EF_SHIFT_DOWN)); | 1957 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RIGHT, ui::EF_SHIFT_DOWN)); |
| 1958 EXPECT_EQ(2u, GetSelectionSize(omnibox_view)); | 1958 EXPECT_EQ(2u, GetSelectionSize(omnibox_view)); |
| 1959 | 1959 |
| 1960 // And Left should reduce by one character. | 1960 // And Left should reduce by one character. |
| 1961 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_LEFT, ui::EF_SHIFT_DOWN)); | 1961 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_LEFT, ui::EF_SHIFT_DOWN)); |
| 1962 EXPECT_EQ(1u, GetSelectionSize(omnibox_view)); | 1962 EXPECT_EQ(1u, GetSelectionSize(omnibox_view)); |
| 1963 } | 1963 } |
| OLD | NEW |