OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
11 #include "chrome/browser/gtk/bookmark_editor_gtk.h" | 11 #include "chrome/browser/gtk/bookmark_editor_gtk.h" |
12 #include "chrome/browser/gtk/bookmark_tree_model.h" | 12 #include "chrome/browser/gtk/bookmark_tree_model.h" |
13 #include "chrome/browser/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/test/testing_profile.h" | 16 #include "chrome/test/testing_profile.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using base::Time; | 19 using base::Time; |
20 using base::TimeDelta; | 20 using base::TimeDelta; |
21 using bookmark_utils::GetTitleFromTreeIter; | 21 using bookmark_utils::GetTitleFromTreeIter; |
22 | 22 |
23 // Base class for bookmark editor tests. This class is a copy from | 23 // Base class for bookmark editor tests. This class is a copy from |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a"); | 318 gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a"); |
319 | 319 |
320 editor.ApplyEdits(); | 320 editor.ApplyEdits(); |
321 | 321 |
322 const BookmarkNode* other_node = profile_->GetBookmarkModel()->other_node(); | 322 const BookmarkNode* other_node = profile_->GetBookmarkModel()->other_node(); |
323 ASSERT_EQ(2, other_node->GetChildCount()); | 323 ASSERT_EQ(2, other_node->GetChildCount()); |
324 | 324 |
325 const BookmarkNode* new_node = other_node->GetChild(0); | 325 const BookmarkNode* new_node = other_node->GetChild(0); |
326 EXPECT_EQ(L"new_a", new_node->GetTitle()); | 326 EXPECT_EQ(L"new_a", new_node->GetTitle()); |
327 } | 327 } |
OLD | NEW |