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

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

Issue 3133031: Make TestingProfile use ScopedTempDir. (Closed)
Patch Set: trybots 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/net/gaia/token_service_unittest.cc ('k') | chrome/test/testing_profile.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) 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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/bookmarks/bookmark_model.h" 6 #include "chrome/browser/bookmarks/bookmark_model.h"
7 #include "chrome/browser/chrome_thread.h" 7 #include "chrome/browser/chrome_thread.h"
8 #include "chrome/browser/views/bookmark_bar_view.h" 8 #include "chrome/browser/views/bookmark_bar_view.h"
9 #include "chrome/test/browser_with_test_window_test.h" 9 #include "chrome/test/browser_with_test_window_test.h"
10 #include "chrome/test/testing_profile.h" 10 #include "chrome/test/testing_profile.h"
(...skipping 16 matching lines...) Expand all
27 profile()->GetBookmarkModel()->AddURL( 27 profile()->GetBookmarkModel()->AddURL(
28 profile()->GetBookmarkModel()->GetBookmarkBarNode(), 28 profile()->GetBookmarkModel()->GetBookmarkBarNode(),
29 0, 29 0,
30 ASCIIToUTF16("blah"), 30 ASCIIToUTF16("blah"),
31 GURL("http://www.google.com")); 31 GURL("http://www.google.com"));
32 32
33 BookmarkBarView bookmark_bar(profile(), browser()); 33 BookmarkBarView bookmark_bar(profile(), browser());
34 34
35 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount()); 35 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount());
36 36
37 TestingProfile profile2(0); 37 TestingProfile profile2;
38 profile2.CreateBookmarkModel(true); 38 profile2.CreateBookmarkModel(true);
39 profile2.BlockUntilBookmarkModelLoaded(); 39 profile2.BlockUntilBookmarkModelLoaded();
40 40
41 bookmark_bar.SetProfile(&profile2); 41 bookmark_bar.SetProfile(&profile2);
42 42
43 EXPECT_EQ(0, bookmark_bar.GetBookmarkButtonCount()); 43 EXPECT_EQ(0, bookmark_bar.GetBookmarkButtonCount());
44 44
45 bookmark_bar.SetProfile(profile()); 45 bookmark_bar.SetProfile(profile());
46 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount()); 46 EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount());
47 } 47 }
OLDNEW
« no previous file with comments | « chrome/browser/net/gaia/token_service_unittest.cc ('k') | chrome/test/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698