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 "components/undo/bookmark_undo_service.h" | 5 #include "components/undo/bookmark_undo_service.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
8 #include "components/bookmarks/browser/bookmark_model.h" | 11 #include "components/bookmarks/browser/bookmark_model.h" |
9 #include "components/bookmarks/test/bookmark_test_helpers.h" | 12 #include "components/bookmarks/test/bookmark_test_helpers.h" |
10 #include "components/bookmarks/test/test_bookmark_client.h" | 13 #include "components/bookmarks/test/test_bookmark_client.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
12 | 15 |
13 using base::ASCIIToUTF16; | 16 using base::ASCIIToUTF16; |
14 using bookmarks::BookmarkModel; | 17 using bookmarks::BookmarkModel; |
15 using bookmarks::BookmarkNode; | 18 using bookmarks::BookmarkNode; |
16 | 19 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 while (undo_service->undo_manager()->undo_count()) | 458 while (undo_service->undo_manager()->undo_count()) |
456 undo_service->undo_manager()->Undo(); | 459 undo_service->undo_manager()->Undo(); |
457 | 460 |
458 EXPECT_EQ(1, parent->child_count()); | 461 EXPECT_EQ(1, parent->child_count()); |
459 const BookmarkNode* node = model->other_node()->GetChild(0); | 462 const BookmarkNode* node = model->other_node()->GetChild(0); |
460 EXPECT_EQ(node->GetTitle(), ASCIIToUTF16("foo")); | 463 EXPECT_EQ(node->GetTitle(), ASCIIToUTF16("foo")); |
461 EXPECT_EQ(node->url(), GURL("http://www.foo.com")); | 464 EXPECT_EQ(node->url(), GURL("http://www.foo.com")); |
462 } | 465 } |
463 | 466 |
464 } // namespace | 467 } // namespace |
OLD | NEW |