| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> | 
| 6 | 6 | 
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" | 
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" | 
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" | 
| 10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79   void ApplyEdits(BookmarkEditorView::EditorNode* node) { | 79   void ApplyEdits(BookmarkEditorView::EditorNode* node) { | 
| 80     editor_->ApplyEdits(node); | 80     editor_->ApplyEdits(node); | 
| 81   } | 81   } | 
| 82 | 82 | 
| 83   BookmarkEditorView::EditorNode* AddNewGroup( | 83   BookmarkEditorView::EditorNode* AddNewGroup( | 
| 84       BookmarkEditorView::EditorNode* parent) { | 84       BookmarkEditorView::EditorNode* parent) { | 
| 85     return editor_->AddNewGroup(parent); | 85     return editor_->AddNewGroup(parent); | 
| 86   } | 86   } | 
| 87 | 87 | 
| 88   bool URLTFHasParent() { | 88   bool URLTFHasParent() { | 
| 89     return editor_->url_tf_.GetParent(); | 89     return editor_->url_tf_.parent(); | 
| 90   } | 90   } | 
| 91 | 91 | 
| 92  private: | 92  private: | 
| 93   // Creates the following structure: | 93   // Creates the following structure: | 
| 94   // bookmark bar node | 94   // bookmark bar node | 
| 95   //   a | 95   //   a | 
| 96   //   F1 | 96   //   F1 | 
| 97   //    f1a | 97   //    f1a | 
| 98   //    F11 | 98   //    F11 | 
| 99   //     f11a | 99   //     f11a | 
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 357   EXPECT_EQ(BookmarkNode::FOLDER, new_node->type()); | 357   EXPECT_EQ(BookmarkNode::FOLDER, new_node->type()); | 
| 358   EXPECT_EQ(ASCIIToUTF16("new_F"), new_node->GetTitle()); | 358   EXPECT_EQ(ASCIIToUTF16("new_F"), new_node->GetTitle()); | 
| 359   // The node should have one child. | 359   // The node should have one child. | 
| 360   ASSERT_EQ(1, new_node->GetChildCount()); | 360   ASSERT_EQ(1, new_node->GetChildCount()); | 
| 361   const BookmarkNode* new_child = new_node->GetChild(0); | 361   const BookmarkNode* new_child = new_node->GetChild(0); | 
| 362   // Make sure the child url/title match. | 362   // Make sure the child url/title match. | 
| 363   EXPECT_EQ(BookmarkNode::URL, new_child->type()); | 363   EXPECT_EQ(BookmarkNode::URL, new_child->type()); | 
| 364   EXPECT_EQ(WideToUTF16Hack(details.urls[0].second), new_child->GetTitle()); | 364   EXPECT_EQ(WideToUTF16Hack(details.urls[0].second), new_child->GetTitle()); | 
| 365   EXPECT_EQ(details.urls[0].first, new_child->GetURL()); | 365   EXPECT_EQ(details.urls[0].first, new_child->GetURL()); | 
| 366 } | 366 } | 
| OLD | NEW | 
|---|