OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/undo/bookmark_undo_service.h" | 5 #include "chrome/browser/undo/bookmark_undo_service.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
9 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 9 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
11 #include "components/bookmarks/core/browser/bookmark_model.h" | 11 #include "components/bookmarks/browser/bookmark_model.h" |
12 #include "components/bookmarks/core/test/bookmark_test_helpers.h" | 12 #include "components/bookmarks/test/bookmark_test_helpers.h" |
13 #include "content/public/test/test_browser_thread_bundle.h" | 13 #include "content/public/test/test_browser_thread_bundle.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using base::ASCIIToUTF16; | 16 using base::ASCIIToUTF16; |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class BookmarkUndoServiceTest : public testing::Test { | 20 class BookmarkUndoServiceTest : public testing::Test { |
21 public: | 21 public: |
22 BookmarkUndoServiceTest(); | 22 BookmarkUndoServiceTest(); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 while (undo_service->undo_manager()->undo_count()) | 410 while (undo_service->undo_manager()->undo_count()) |
411 undo_service->undo_manager()->Undo(); | 411 undo_service->undo_manager()->Undo(); |
412 | 412 |
413 EXPECT_EQ(1, parent->child_count()); | 413 EXPECT_EQ(1, parent->child_count()); |
414 const BookmarkNode* node = model->other_node()->GetChild(0); | 414 const BookmarkNode* node = model->other_node()->GetChild(0); |
415 EXPECT_EQ(node->GetTitle(), ASCIIToUTF16("foo")); | 415 EXPECT_EQ(node->GetTitle(), ASCIIToUTF16("foo")); |
416 EXPECT_EQ(node->url(), GURL("http://www.foo.com")); | 416 EXPECT_EQ(node->url(), GURL("http://www.foo.com")); |
417 } | 417 } |
418 | 418 |
419 } // namespace | 419 } // namespace |
OLD | NEW |