Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Side by Side Diff: chrome/browser/ui/search/search_ipc_router_unittest.cc

Issue 2122903002: Move search-related files from chrome/common to chrome/common/search (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move search-related files Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.h ('k') | chrome/browser/ui/search/search_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/metrics/field_trial.h" 15 #include "base/metrics/field_trial.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/search/search.h" 19 #include "chrome/browser/search/search.h"
20 #include "chrome/browser/search_engines/template_url_service_factory.h" 20 #include "chrome/browser/search_engines/template_url_service_factory.h"
21 #include "chrome/browser/ui/search/search_ipc_router_policy_impl.h" 21 #include "chrome/browser/ui/search/search_ipc_router_policy_impl.h"
22 #include "chrome/browser/ui/search/search_tab_helper.h" 22 #include "chrome/browser/ui/search/search_tab_helper.h"
23 #include "chrome/browser/ui/tabs/tab_strip_model.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/instant_types.h"
26 #include "chrome/common/ntp_logging_events.h"
27 #include "chrome/common/render_messages.h" 25 #include "chrome/common/render_messages.h"
26 #include "chrome/common/search/instant_types.h"
27 #include "chrome/common/search/ntp_logging_events.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "chrome/test/base/browser_with_test_window_test.h" 29 #include "chrome/test/base/browser_with_test_window_test.h"
30 #include "chrome/test/base/search_test_utils.h" 30 #include "chrome/test/base/search_test_utils.h"
31 #include "components/omnibox/common/omnibox_focus_state.h" 31 #include "components/omnibox/common/omnibox_focus_state.h"
32 #include "components/search_engines/template_url_service.h" 32 #include "components/search_engines/template_url_service.h"
33 #include "content/public/browser/navigation_controller.h" 33 #include "content/public/browser/navigation_controller.h"
34 #include "content/public/browser/navigation_entry.h" 34 #include "content/public/browser/navigation_entry.h"
35 #include "content/public/browser/web_contents.h" 35 #include "content/public/browser/web_contents.h"
36 #include "content/public/test/mock_render_process_host.h" 36 #include "content/public/test/mock_render_process_host.h"
37 #include "ipc/ipc_message.h" 37 #include "ipc/ipc_message.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 784
785 // Construct a series of synthetic messages for each valid IPC message type, 785 // Construct a series of synthetic messages for each valid IPC message type,
786 // ensuring the router ignores them all. 786 // ensuring the router ignores them all.
787 for (int i = 0; i < LastIPCMsgStart; ++i) { 787 for (int i = 0; i < LastIPCMsgStart; ++i) {
788 const int message_id = i << 16; 788 const int message_id = i << 16;
789 ASSERT_EQ(IPC_MESSAGE_ID_CLASS(message_id), i); 789 ASSERT_EQ(IPC_MESSAGE_ID_CLASS(message_id), i);
790 IPC::Message msg(routing_id, message_id, IPC::Message::PRIORITY_LOW); 790 IPC::Message msg(routing_id, message_id, IPC::Message::PRIORITY_LOW);
791 EXPECT_FALSE(OnSpuriousMessageReceived(msg)) << i; 791 EXPECT_FALSE(OnSpuriousMessageReceived(msg)) << i;
792 } 792 }
793 } 793 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.h ('k') | chrome/browser/ui/search/search_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698