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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc

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
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc ('k') | no next file » | 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/views/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 11 matching lines...) Expand all
22 22
23 class BookmarkBubbleViewTest : public BrowserWithTestWindowTest { 23 class BookmarkBubbleViewTest : public BrowserWithTestWindowTest {
24 public: 24 public:
25 BookmarkBubbleViewTest() {} 25 BookmarkBubbleViewTest() {}
26 26
27 // testing::Test: 27 // testing::Test:
28 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() OVERRIDE {
29 BrowserWithTestWindowTest::SetUp(); 29 BrowserWithTestWindowTest::SetUp();
30 30
31 profile()->CreateBookmarkModel(true); 31 profile()->CreateBookmarkModel(true);
32 test::WaitForBookmarkModelToLoad(profile()); 32 BookmarkModel* bookmark_model =
33 BookmarkModelFactory::GetForProfile(profile());
34 test::WaitForBookmarkModelToLoad(bookmark_model);
33 35
34 bookmark_utils::AddIfNotBookmarked( 36 bookmark_utils::AddIfNotBookmarked(
35 BookmarkModelFactory::GetForProfile(profile()), 37 bookmark_model, GURL(kTestBookmarkURL), base::string16());
36 GURL(kTestBookmarkURL),
37 base::string16());
38 } 38 }
39 39
40 virtual void TearDown() OVERRIDE { 40 virtual void TearDown() OVERRIDE {
41 // Make sure the bubble is destroyed before the profile to avoid a crash. 41 // Make sure the bubble is destroyed before the profile to avoid a crash.
42 bubble_.reset(); 42 bubble_.reset();
43 43
44 BrowserWithTestWindowTest::TearDown(); 44 BrowserWithTestWindowTest::TearDown();
45 } 45 }
46 46
47 // BrowserWithTestWindowTest: 47 // BrowserWithTestWindowTest:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Verifies that the sync promo is displayed for a user that is not signed in. 90 // Verifies that the sync promo is displayed for a user that is not signed in.
91 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) { 91 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) {
92 CreateBubbleView(); 92 CreateBubbleView();
93 bubble_->Init(); 93 bubble_->Init();
94 #if defined(OS_CHROMEOS) 94 #if defined(OS_CHROMEOS)
95 EXPECT_FALSE(bubble_->sync_promo_view_); 95 EXPECT_FALSE(bubble_->sync_promo_view_);
96 #else // !defined(OS_CHROMEOS) 96 #else // !defined(OS_CHROMEOS)
97 EXPECT_TRUE(bubble_->sync_promo_view_); 97 EXPECT_TRUE(bubble_->sync_promo_view_);
98 #endif 98 #endif
99 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698