| 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/ui/bookmarks/bookmark_editor.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 using base::ASCIIToUTF16; |
| 11 |
| 10 namespace { | 12 namespace { |
| 11 | 13 |
| 12 TEST(BookmarkEditorTest, ApplyEditsWithNoFolderChange) { | 14 TEST(BookmarkEditorTest, ApplyEditsWithNoFolderChange) { |
| 13 BookmarkModel model(NULL); | 15 BookmarkModel model(NULL); |
| 14 const BookmarkNode* bookmarkbar = model.bookmark_bar_node(); | 16 const BookmarkNode* bookmarkbar = model.bookmark_bar_node(); |
| 15 model.AddURL(bookmarkbar, 0, ASCIIToUTF16("url0"), GURL("chrome://newtab")); | 17 model.AddURL(bookmarkbar, 0, ASCIIToUTF16("url0"), GURL("chrome://newtab")); |
| 16 model.AddURL(bookmarkbar, 1, ASCIIToUTF16("url1"), GURL("chrome://newtab")); | 18 model.AddURL(bookmarkbar, 1, ASCIIToUTF16("url1"), GURL("chrome://newtab")); |
| 17 | 19 |
| 18 { | 20 { |
| 19 BookmarkEditor::EditDetails detail( | 21 BookmarkEditor::EditDetails detail( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 BookmarkEditor::ApplyEditsWithNoFolderChange(&model, | 43 BookmarkEditor::ApplyEditsWithNoFolderChange(&model, |
| 42 bookmarkbar, | 44 bookmarkbar, |
| 43 detail, | 45 detail, |
| 44 ASCIIToUTF16("folder2"), | 46 ASCIIToUTF16("folder2"), |
| 45 GURL(std::string())); | 47 GURL(std::string())); |
| 46 EXPECT_EQ(ASCIIToUTF16("folder2"), bookmarkbar->GetChild(4)->GetTitle()); | 48 EXPECT_EQ(ASCIIToUTF16("folder2"), bookmarkbar->GetChild(4)->GetTitle()); |
| 47 } | 49 } |
| 48 } | 50 } |
| 49 | 51 |
| 50 } // namespace | 52 } // namespace |
| OLD | NEW |