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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc

Issue 7574021: Remove frontend code that allows for dynamic profile setting, and read the profile off the browse... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
===================================================================
--- chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc (revision 95527)
+++ chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc (working copy)
@@ -1,38 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/bookmarks/bookmark_model.h"
-#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
-#include "chrome/test/base/browser_with_test_window_test.h"
-#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
-
-typedef BrowserWithTestWindowTest BookmarkBarViewTest;
-
-TEST_F(BookmarkBarViewTest, SwitchProfile) {
- profile()->CreateBookmarkModel(true);
- profile()->BlockUntilBookmarkModelLoaded();
-
- profile()->GetBookmarkModel()->AddURL(
- profile()->GetBookmarkModel()->bookmark_bar_node(),
- 0,
- ASCIIToUTF16("blah"),
- GURL("http://www.google.com"));
-
- BookmarkBarView bookmark_bar(profile(), browser());
-
- EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount());
-
- TestingProfile profile2;
- profile2.CreateBookmarkModel(true);
- profile2.BlockUntilBookmarkModelLoaded();
-
- bookmark_bar.SetProfile(&profile2);
-
- EXPECT_EQ(0, bookmark_bar.GetBookmarkButtonCount());
-
- bookmark_bar.SetProfile(profile());
- EXPECT_EQ(1, bookmark_bar.GetBookmarkButtonCount());
-}

Powered by Google App Engine
This is Rietveld 408576698