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

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

Issue 7621066: Fix sync test crashing when multiprofiles are enabled on Mac. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.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 (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 "chrome/browser/extensions/extension_event_router_forwarder.h" 5 #include "chrome/browser/extensions/extension_event_router_forwarder.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/system_monitor/system_monitor.h" 8 #include "base/system_monitor/system_monitor.h"
9 #include "base/test/thread_test_helper.h" 9 #include "base/test/thread_test_helper.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual void SetUp() { 49 virtual void SetUp() {
50 // Inject a BrowserProcess with a ProfileManager. 50 // Inject a BrowserProcess with a ProfileManager.
51 ASSERT_TRUE(io_thread_.Start()); 51 ASSERT_TRUE(io_thread_.Start());
52 52
53 TestingBrowserProcess* browser_process = testing_browser_process_.get(); 53 TestingBrowserProcess* browser_process = testing_browser_process_.get();
54 browser_process->SetProfileManager(new ProfileManager); 54 browser_process->SetProfileManager(new ProfileManager);
55 55
56 profile1_ = new TestingProfile(); 56 profile1_ = new TestingProfile();
57 profile2_ = new TestingProfile(); 57 profile2_ = new TestingProfile();
58 58
59 browser_process->profile_manager()->RegisterProfile(profile1_, true); 59 browser_process->profile_manager()->RegisterTestingProfile(profile1_,
60 browser_process->profile_manager()->RegisterProfile(profile2_, true); 60 false);
61 browser_process->profile_manager()->RegisterTestingProfile(profile2_,
62 false);
61 } 63 }
62 64
63 TestingProfile* CreateIncognitoProfile(TestingProfile* base) { 65 TestingProfile* CreateIncognitoProfile(TestingProfile* base) {
64 TestingProfile* incognito = new TestingProfile(); 66 TestingProfile* incognito = new TestingProfile();
65 incognito->set_incognito(true); 67 incognito->set_incognito(true);
66 base->SetOffTheRecordProfile(incognito); 68 base->SetOffTheRecordProfile(incognito);
67 return incognito; 69 return incognito;
68 } 70 }
69 71
70 MessageLoopForUI message_loop_; 72 MessageLoopForUI message_loop_;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 using ::testing::_; 251 using ::testing::_;
250 GURL url; 252 GURL url;
251 EXPECT_CALL(*event_router, 253 EXPECT_CALL(*event_router,
252 CallExtensionEventRouter( 254 CallExtensionEventRouter(
253 profile1_, kExt, kEventName, kEventArgs, NULL, url)); 255 profile1_, kExt, kEventName, kEventArgs, NULL, url));
254 EXPECT_CALL(*event_router, 256 EXPECT_CALL(*event_router,
255 CallExtensionEventRouter(profile2_, _, _, _, _, _)).Times(0); 257 CallExtensionEventRouter(profile2_, _, _, _, _, _)).Times(0);
256 event_router->DispatchEventToExtension(kExt, kEventName, kEventArgs, 258 event_router->DispatchEventToExtension(kExt, kEventName, kEventArgs,
257 profile1_, false, url); 259 profile1_, false, url);
258 } 260 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698