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

Side by Side Diff: chrome/browser/extensions/event_router_forwarder_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler codez Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/extensions/event_router_forwarder.h" 5 #include "chrome/browser/extensions/event_router_forwarder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/system_monitor/system_monitor.h" 9 #include "base/system_monitor/system_monitor.h"
10 #include "base/test/thread_test_helper.h" 10 #include "base/test/thread_test_helper.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 } // namespace 85 } // namespace
86 86
87 class EventRouterForwarderTest : public testing::Test { 87 class EventRouterForwarderTest : public testing::Test {
88 protected: 88 protected:
89 EventRouterForwarderTest() 89 EventRouterForwarderTest()
90 : ui_thread_(BrowserThread::UI, &message_loop_), 90 : ui_thread_(BrowserThread::UI, &message_loop_),
91 io_thread_(BrowserThread::IO), 91 io_thread_(BrowserThread::IO),
92 profile_manager_( 92 profile_manager_(
93 static_cast<TestingBrowserProcess*>(g_browser_process)) { 93 TestingBrowserProcess::GetGlobal()) {
94 #if defined(OS_MACOSX) 94 #if defined(OS_MACOSX)
95 base::SystemMonitor::AllocateSystemIOPorts(); 95 base::SystemMonitor::AllocateSystemIOPorts();
96 #endif 96 #endif
97 dummy.reset(new base::SystemMonitor); 97 dummy.reset(new base::SystemMonitor);
98 } 98 }
99 99
100 virtual void SetUp() { 100 virtual void SetUp() {
101 ASSERT_TRUE(profile_manager_.SetUp()); 101 ASSERT_TRUE(profile_manager_.SetUp());
102 102
103 // Inject a BrowserProcess with a ProfileManager. 103 // Inject a BrowserProcess with a ProfileManager.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 GURL url; 280 GURL url;
281 EXPECT_CALL(*event_router, 281 EXPECT_CALL(*event_router,
282 CallEventRouter(profile1_, kExt, kEventName, NULL, url)); 282 CallEventRouter(profile1_, kExt, kEventName, NULL, url));
283 EXPECT_CALL(*event_router, 283 EXPECT_CALL(*event_router,
284 CallEventRouter(profile2_, _, _, _, _)).Times(0); 284 CallEventRouter(profile2_, _, _, _, _)).Times(0);
285 DispatchEventToExtension(event_router.get(), kExt, kEventName, profile1_, 285 DispatchEventToExtension(event_router.get(), kExt, kEventName, profile1_,
286 false, url); 286 false, url);
287 } 287 }
288 288
289 } // namespace extensions 289 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698