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

Side by Side Diff: chrome/browser/cocoa/browser_test_helper.h

Issue 46078: Mac bookmark work. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/profile.h"
7 #include "chrome/test/testing_profile.h"
8
9 // Base class which contains a valid Browser*. Lots of boilerplate to
10 // recycle between unit test classes.
11 //
12 // TODO(jrg): move up a level (chrome/browser/cocoa -->
13 // chrome/browser), and use in non-Mac unit tests such as
14 // back_forward_menu_model_unittest.cc,
15 // navigation_controller_unittest.cc, ..
16 class BrowserTestHelper {
17 public:
18 BrowserTestHelper() {
19 TestingProfile *testing_profile = new TestingProfile();
20 testing_profile->CreateBookmarkModel(true);
21 testing_profile->BlockUntilBookmarkModelLoaded();
22 profile_ = testing_profile;
23 browser_ = new Browser(Browser::TYPE_NORMAL, profile_);
24 }
25
26 ~BrowserTestHelper() {
27 delete browser_;
28 delete profile_;
29 }
30
31 Browser* GetBrowser() { return browser_; }
32 Profile* GetProfile() { return profile_; }
33
34 private:
35 Browser* browser_;
36 Profile* profile_;
37 MessageLoopForUI message_loop_;
38 };
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_menu_bridge_unittest.mm ('k') | chrome/browser/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698