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

Side by Side Diff: chrome/browser/bookmarks/chrome_bookmark_client_unittest.cc

Issue 552643002: Move MockBookmarkModelObserver into bookmarks namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | components/bookmarks/test/mock_bookmark_model_observer.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_bookmark_client.h" 5 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return false; 123 return false;
124 } else { 124 } else {
125 return false; 125 return false;
126 } 126 }
127 return true; 127 return true;
128 } 128 }
129 129
130 content::TestBrowserThreadBundle thread_bundle_; 130 content::TestBrowserThreadBundle thread_bundle_;
131 TestingProfile profile_; 131 TestingProfile profile_;
132 TestingPrefServiceSyncable* prefs_; 132 TestingPrefServiceSyncable* prefs_;
133 MockBookmarkModelObserver observer_; 133 bookmarks::MockBookmarkModelObserver observer_;
134 ChromeBookmarkClient* client_; 134 ChromeBookmarkClient* client_;
135 BookmarkModel* model_; 135 BookmarkModel* model_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClientTest); 137 DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClientTest);
138 }; 138 };
139 139
140 TEST_F(ChromeBookmarkClientTest, EmptyManagedNode) { 140 TEST_F(ChromeBookmarkClientTest, EmptyManagedNode) {
141 // Verifies that the managed node is empty and invisible when the policy is 141 // Verifies that the managed node is empty and invisible when the policy is
142 // not set. 142 // not set.
143 model_->RemoveObserver(&observer_); 143 model_->RemoveObserver(&observer_);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 const BookmarkNode* managed_node = client_->managed_node()->GetChild(0); 279 const BookmarkNode* managed_node = client_->managed_node()->GetChild(0);
280 ASSERT_TRUE(managed_node); 280 ASSERT_TRUE(managed_node);
281 281
282 std::vector<const BookmarkNode*> nodes; 282 std::vector<const BookmarkNode*> nodes;
283 EXPECT_FALSE(client_->HasDescendantsOfManagedNode(nodes)); 283 EXPECT_FALSE(client_->HasDescendantsOfManagedNode(nodes));
284 nodes.push_back(user_node); 284 nodes.push_back(user_node);
285 EXPECT_FALSE(client_->HasDescendantsOfManagedNode(nodes)); 285 EXPECT_FALSE(client_->HasDescendantsOfManagedNode(nodes));
286 nodes.push_back(managed_node); 286 nodes.push_back(managed_node);
287 EXPECT_TRUE(client_->HasDescendantsOfManagedNode(nodes)); 287 EXPECT_TRUE(client_->HasDescendantsOfManagedNode(nodes));
288 } 288 }
OLDNEW
« no previous file with comments | « no previous file | components/bookmarks/test/mock_bookmark_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698