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

Side by Side Diff: components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc

Issue 562693002: Move TestBookmarkClient into bookmarks namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix enhanced_bookmarks 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
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 "components/enhanced_bookmarks/enhanced_bookmark_model.h" 5 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "components/bookmarks/browser/bookmark_model.h" 12 #include "components/bookmarks/browser/bookmark_model.h"
13 #include "components/bookmarks/browser/bookmark_node.h" 13 #include "components/bookmarks/browser/bookmark_node.h"
14 #include "components/bookmarks/test/test_bookmark_client.h" 14 #include "components/bookmarks/test/test_bookmark_client.h"
15 #include "components/enhanced_bookmarks/proto/metadata.pb.h" 15 #include "components/enhanced_bookmarks/proto/metadata.pb.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace { 19 namespace {
20 20
21 const std::string BOOKMARK_URL("http://example.com/index.html"); 21 const std::string BOOKMARK_URL("http://example.com/index.html");
22 22
23 class EnhancedBookmarkModelTest : public testing::Test { 23 class EnhancedBookmarkModelTest : public testing::Test {
24 public: 24 public:
25 EnhancedBookmarkModelTest() {} 25 EnhancedBookmarkModelTest() {}
26 virtual ~EnhancedBookmarkModelTest() {} 26 virtual ~EnhancedBookmarkModelTest() {}
27 27
28 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() OVERRIDE {
29 test::TestBookmarkClient bookmark_client; 29 bookmarks::TestBookmarkClient bookmark_client;
30 bookmark_model_.reset(bookmark_client.CreateModel().release()); 30 bookmark_model_.reset(bookmark_client.CreateModel().release());
31 model_.reset(new enhanced_bookmarks::EnhancedBookmarkModel( 31 model_.reset(new enhanced_bookmarks::EnhancedBookmarkModel(
32 bookmark_model_.get(), "v1.0")); 32 bookmark_model_.get(), "v1.0"));
33 } 33 }
34 34
35 virtual void TearDown() OVERRIDE { 35 virtual void TearDown() OVERRIDE {
36 model_.reset(); 36 model_.reset();
37 bookmark_model_.reset(); 37 bookmark_model_.reset();
38 } 38 }
39 39
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 TEST_F(EnhancedBookmarkModelTest, TestUserEdit) { 371 TEST_F(EnhancedBookmarkModelTest, TestUserEdit) {
372 const BookmarkNode* node = AddBookmark(); 372 const BookmarkNode* node = AddBookmark();
373 373
374 model_->SetDescription(node, "foo"); 374 model_->SetDescription(node, "foo");
375 std::string user_edit; 375 std::string user_edit;
376 ASSERT_TRUE(node->GetMetaInfo("stars.userEdit", &user_edit)); 376 ASSERT_TRUE(node->GetMetaInfo("stars.userEdit", &user_edit));
377 EXPECT_EQ("true", user_edit); 377 EXPECT_EQ("true", user_edit);
378 } 378 }
379 379
380 } // namespace 380 } // namespace
OLDNEW
« no previous file with comments | « components/bookmarks/test/test_bookmark_client.cc ('k') | components/enhanced_bookmarks/enhanced_bookmark_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698