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

Side by Side Diff: chrome/browser/ui/cocoa/cocoa_profile_test.mm

Issue 257003004: Remove dependency on bookmark_model_factory from bookmark_test_helpers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@364433
Patch Set: Fix unit tests on Linux & Windows Created 6 years, 7 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
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/ui/cocoa/cocoa_profile_test.h" 5 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 8 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
9 #include "chrome/browser/bookmarks/bookmark_test_helpers.h" 10 #include "chrome/browser/bookmarks/bookmark_test_helpers.h"
10 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/search_engines/template_url_service_factory.h" 12 #include "chrome/browser/search_engines/template_url_service_factory.h"
12 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_commands.h" 14 #include "chrome/browser/ui/browser_commands.h"
14 #include "chrome/browser/ui/browser_tabstrip.h" 15 #include "chrome/browser/ui/browser_tabstrip.h"
15 #include "chrome/browser/ui/host_desktop.h" 16 #include "chrome/browser/ui/host_desktop.h"
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" 17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
17 #include "chrome/test/base/testing_browser_process.h" 18 #include "chrome/test/base/testing_browser_process.h"
18 #include "chrome/test/base/testing_profile.h" 19 #include "chrome/test/base/testing_profile.h"
(...skipping 23 matching lines...) Expand all
42 43
43 void CocoaProfileTest::SetUp() { 44 void CocoaProfileTest::SetUp() {
44 CocoaTest::SetUp(); 45 CocoaTest::SetUp();
45 46
46 ASSERT_TRUE(profile_manager_.SetUp()); 47 ASSERT_TRUE(profile_manager_.SetUp());
47 48
48 profile_ = profile_manager_.CreateTestingProfile("default"); 49 profile_ = profile_manager_.CreateTestingProfile("default");
49 ASSERT_TRUE(profile_); 50 ASSERT_TRUE(profile_);
50 51
51 profile_->CreateBookmarkModel(true); 52 profile_->CreateBookmarkModel(true);
52 test::WaitForBookmarkModelToLoad(profile_); 53 test::WaitForBookmarkModelToLoad(
54 BookmarkModelFactory::GetForProfile(profile_));
53 55
54 // TODO(shess): These are needed in case someone creates a browser 56 // TODO(shess): These are needed in case someone creates a browser
55 // window off of browser_. pkasting indicates that other 57 // window off of browser_. pkasting indicates that other
56 // platforms use a stub |BrowserWindow| and thus don't need to do 58 // platforms use a stub |BrowserWindow| and thus don't need to do
57 // this. 59 // this.
58 // http://crbug.com/39725 60 // http://crbug.com/39725
59 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( 61 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
60 profile_, &TemplateURLServiceFactory::BuildInstanceFor); 62 profile_, &TemplateURLServiceFactory::BuildInstanceFor);
61 AutocompleteClassifierFactory::GetInstance()->SetTestingFactoryAndUse( 63 AutocompleteClassifierFactory::GetInstance()->SetTestingFactoryAndUse(
62 profile_, &AutocompleteClassifierFactory::BuildInstanceFor); 64 profile_, &AutocompleteClassifierFactory::BuildInstanceFor);
(...skipping 15 matching lines...) Expand all
78 browser_->tab_strip_model()->CloseAllTabs(); 80 browser_->tab_strip_model()->CloseAllTabs();
79 chrome::CloseWindow(browser_.get()); 81 chrome::CloseWindow(browser_.get());
80 // |browser_| will be deleted by its BrowserWindowController. 82 // |browser_| will be deleted by its BrowserWindowController.
81 ignore_result(browser_.release()); 83 ignore_result(browser_.release());
82 } 84 }
83 85
84 Browser* CocoaProfileTest::CreateBrowser() { 86 Browser* CocoaProfileTest::CreateBrowser() {
85 return new Browser(Browser::CreateParams(profile(), 87 return new Browser(Browser::CreateParams(profile(),
86 chrome::GetActiveDesktop())); 88 chrome::GetActiveDesktop()));
87 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698