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

Side by Side Diff: chrome/browser/views/bookmark_bar_view_unittest.cc

Issue 3133022: sync: take two for: "Added classes to enable session sync... (Closed)
Patch Set: Created 10 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
« no previous file with comments | « chrome/browser/sync/syncable/model_type.cc ('k') | chrome/chrome.gyp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/bookmarks/bookmark_model.h" 5 #include "chrome/browser/bookmarks/bookmark_model.h"
6 #include "chrome/browser/chrome_thread.h" 6 #include "chrome/browser/chrome_thread.h"
7 #include "chrome/browser/views/bookmark_bar_view.h" 7 #include "chrome/browser/views/bookmark_bar_view.h"
8 #include "chrome/test/browser_with_test_window_test.h" 8 #include "chrome/test/browser_with_test_window_test.h"
9 #include "chrome/test/testing_profile.h" 9 #include "chrome/test/testing_profile.h"
10 10
11 class BookmarkBarViewTest : public BrowserWithTestWindowTest { 11 class BookmarkBarViewTest : public BrowserWithTestWindowTest {
12 public: 12 public:
13 BookmarkBarViewTest() 13 BookmarkBarViewTest()
14 : ui_thread_(ChromeThread::UI, message_loop()), 14 : file_thread_(ChromeThread::FILE, message_loop()) {}
15 file_thread_(ChromeThread::FILE, message_loop()) {}
16 15
17 private: 16 private:
18 ChromeThread ui_thread_;
19 ChromeThread file_thread_; 17 ChromeThread file_thread_;
20 18
21 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTest); 19 DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTest);
22 }; 20 };
23 21
24 TEST_F(BookmarkBarViewTest, SwitchProfile) { 22 TEST_F(BookmarkBarViewTest, SwitchProfile) {
25 profile()->CreateBookmarkModel(true); 23 profile()->CreateBookmarkModel(true);
26 profile()->BlockUntilBookmarkModelLoaded(); 24 profile()->BlockUntilBookmarkModelLoaded();
27 25
28 profile()->GetBookmarkModel()->AddURL( 26 profile()->GetBookmarkModel()->AddURL(
(...skipping 10 matching lines...) Expand all
39 profile2.CreateBookmarkModel(true); 37 profile2.CreateBookmarkModel(true);
40 profile2.BlockUntilBookmarkModelLoaded(); 38 profile2.BlockUntilBookmarkModelLoaded();
41 39
42 bookmark_bar.SetProfile(&profile2); 40 bookmark_bar.SetProfile(&profile2);
43 41
44 EXPECT_EQ(0, bookmark_bar.GetBookmarkButtonCount()); 42 EXPECT_EQ(0, bookmark_bar.GetBookmarkButtonCount());
45 43
46 bookmark_bar.SetProfile(profile()); 44 bookmark_bar.SetProfile(profile());
47 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount()); 45 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount());
48 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/model_type.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698