| OLD | NEW |
| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 bool success = profile_dir_.Delete(); | 38 bool success = profile_dir_.Delete(); |
| 39 ASSERT_TRUE(success); | 39 ASSERT_TRUE(success); |
| 40 } | 40 } |
| 41 | 41 |
| 42 const base::FilePath& GetProfilePath() const { return profile_dir_.path(); } | 42 const base::FilePath& GetProfilePath() const { return profile_dir_.path(); } |
| 43 | 43 |
| 44 BookmarkModel* model() { return model_.get(); } | 44 BookmarkModel* model() { return model_.get(); } |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 base::ScopedTempDir profile_dir_; | 47 base::ScopedTempDir profile_dir_; |
| 48 test::TestBookmarkClient client_; | 48 TestBookmarkClient client_; |
| 49 scoped_ptr<BookmarkModel> model_; | 49 scoped_ptr<BookmarkModel> model_; |
| 50 scoped_ptr<ui::PlatformEventSource> event_source_; | 50 scoped_ptr<ui::PlatformEventSource> event_source_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(BookmarkNodeDataTest); | 52 DISALLOW_COPY_AND_ASSIGN(BookmarkNodeDataTest); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 namespace { | 55 namespace { |
| 56 | 56 |
| 57 ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { | 57 ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { |
| 58 return data.provider().Clone(); | 58 return data.provider().Clone(); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 ASSERT_EQ(1u, read_data.elements.size()); | 291 ASSERT_EQ(1u, read_data.elements.size()); |
| 292 | 292 |
| 293 // Verify that the read data contains the same meta info. | 293 // Verify that the read data contains the same meta info. |
| 294 BookmarkNode::MetaInfoMap meta_info_map = read_data.elements[0].meta_info_map; | 294 BookmarkNode::MetaInfoMap meta_info_map = read_data.elements[0].meta_info_map; |
| 295 EXPECT_EQ(2u, meta_info_map.size()); | 295 EXPECT_EQ(2u, meta_info_map.size()); |
| 296 EXPECT_EQ("somevalue", meta_info_map["somekey"]); | 296 EXPECT_EQ("somevalue", meta_info_map["somekey"]); |
| 297 EXPECT_EQ("someothervalue", meta_info_map["someotherkey"]); | 297 EXPECT_EQ("someothervalue", meta_info_map["someotherkey"]); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace bookmarks | 300 } // namespace bookmarks |
| OLD | NEW |