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

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

Issue 10827047: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/bookmarks/bookmark_model.h" 12 #include "chrome/browser/bookmarks/bookmark_model.h"
13 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 14 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" 16 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h"
16 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/browser/page_navigator.h" 18 #include "content/public/browser/page_navigator.h"
18 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
19 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
20 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
21 22
22 #if defined(OS_WIN) 23 #if defined(OS_WIN)
(...skipping 30 matching lines...) Expand all
53 54
54 virtual void SetUp() { 55 virtual void SetUp() {
55 #if defined(OS_WIN) 56 #if defined(OS_WIN)
56 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true); 57 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(true);
57 #endif 58 #endif
58 59
59 profile_.reset(new TestingProfile()); 60 profile_.reset(new TestingProfile());
60 profile_->CreateBookmarkModel(true); 61 profile_->CreateBookmarkModel(true);
61 profile_->BlockUntilBookmarkModelLoaded(); 62 profile_->BlockUntilBookmarkModelLoaded();
62 63
63 model_ = profile_->GetBookmarkModel(); 64 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
64 65
65 AddTestData(); 66 AddTestData();
66 } 67 }
67 68
68 virtual void TearDown() { 69 virtual void TearDown() {
69 #if defined(OS_WIN) 70 #if defined(OS_WIN)
70 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(false); 71 bookmark_utils::DisableBookmarkBarViewAnimationsForTesting(false);
71 #endif 72 #endif
72 73
73 // Flush the message loop to make application verifiers happy. 74 // Flush the message loop to make application verifiers happy.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); 307 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url());
307 308
308 controller.reset(new BookmarkContextMenu( 309 controller.reset(new BookmarkContextMenu(
309 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); 310 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false));
310 // Cut the URL. 311 // Cut the URL.
311 controller->ExecuteCommand(IDC_CUT); 312 controller->ExecuteCommand(IDC_CUT);
312 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); 313 ASSERT_TRUE(bb_node->GetChild(0)->is_url());
313 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); 314 ASSERT_TRUE(bb_node->GetChild(1)->is_folder());
314 ASSERT_EQ(old_count, bb_node->child_count()); 315 ASSERT_EQ(old_count, bb_node->child_count());
315 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698