| 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 "components/bookmarks/browser/bookmark_utils.h" | 5 #include "components/bookmarks/browser/bookmark_utils.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "components/bookmarks/browser/base_bookmark_model_observer.h" | 11 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
| 12 #include "components/bookmarks/browser/bookmark_model.h" | 12 #include "components/bookmarks/browser/bookmark_model.h" |
| 13 #include "components/bookmarks/browser/bookmark_node_data.h" | 13 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 14 #include "components/bookmarks/test/test_bookmark_client.h" | 14 #include "components/bookmarks/test/test_bookmark_client.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "ui/base/clipboard/clipboard.h" | 16 #include "ui/base/clipboard/clipboard.h" |
| 17 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 17 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 18 | 18 |
| 19 using base::ASCIIToUTF16; | 19 using base::ASCIIToUTF16; |
| 20 using bookmarks::BookmarkClient; | |
| 21 using std::string; | 20 using std::string; |
| 22 | 21 |
| 23 namespace bookmark_utils { | 22 namespace bookmarks { |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 class BookmarkUtilsTest : public testing::Test, | 25 class BookmarkUtilsTest : public testing::Test, |
| 27 public BaseBookmarkModelObserver { | 26 public BaseBookmarkModelObserver { |
| 28 public: | 27 public: |
| 29 BookmarkUtilsTest() | 28 BookmarkUtilsTest() |
| 30 : grouped_changes_beginning_count_(0), | 29 : grouped_changes_beginning_count_(0), |
| 31 grouped_changes_ended_count_(0) {} | 30 grouped_changes_ended_count_(0) {} |
| 32 virtual ~BookmarkUtilsTest() {} | 31 virtual ~BookmarkUtilsTest() {} |
| 33 | 32 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 nodes.clear(); | 444 nodes.clear(); |
| 446 model->GetNodesByURL(url, &nodes); | 445 model->GetNodesByURL(url, &nodes); |
| 447 ASSERT_EQ(1u, nodes.size()); | 446 ASSERT_EQ(1u, nodes.size()); |
| 448 EXPECT_TRUE(model->bookmark_bar_node()->empty()); | 447 EXPECT_TRUE(model->bookmark_bar_node()->empty()); |
| 449 EXPECT_TRUE(model->other_node()->empty()); | 448 EXPECT_TRUE(model->other_node()->empty()); |
| 450 EXPECT_TRUE(model->mobile_node()->empty()); | 449 EXPECT_TRUE(model->mobile_node()->empty()); |
| 451 EXPECT_EQ(1, extra_node->child_count()); | 450 EXPECT_EQ(1, extra_node->child_count()); |
| 452 } | 451 } |
| 453 | 452 |
| 454 } // namespace | 453 } // namespace |
| 455 } // namespace bookmark_utils | 454 } // namespace bookmarks |
| OLD | NEW |