summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_editor_view.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 18:19:01 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 18:19:01 +0000
commit545045f68890e73afc7701a693805aaadf106ea8 (patch)
tree9057466efa50974c60550f3d05c70f7800db9abe /chrome/browser/views/bookmark_editor_view.h
parente807361ea5e82d8964a250a123206df87c0c58c5 (diff)
downloadchromium_src-545045f68890e73afc7701a693805aaadf106ea8.zip
chromium_src-545045f68890e73afc7701a693805aaadf106ea8.tar.gz
chromium_src-545045f68890e73afc7701a693805aaadf106ea8.tar.bz2
Tests for BookmarkEditorView.
BUG=1323423 TEST=this is some tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_editor_view.h')
-rw-r--r--chrome/browser/views/bookmark_editor_view.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h
index 5a2b9d6..8662b07 100644
--- a/chrome/browser/views/bookmark_editor_view.h
+++ b/chrome/browser/views/bookmark_editor_view.h
@@ -64,6 +64,12 @@ class BookmarkEditorView : public ChromeViews::View,
public ChromeViews::ContextMenuController,
public Menu::Delegate,
public BookmarkBarModelObserver {
+ FRIEND_TEST(BookmarkEditorViewTest, ChangeParent);
+ FRIEND_TEST(BookmarkEditorViewTest, ChangeURLToExistingURL);
+ FRIEND_TEST(BookmarkEditorViewTest, EditTitleKeepsPosition);
+ FRIEND_TEST(BookmarkEditorViewTest, EditURLKeepsPosition);
+ FRIEND_TEST(BookmarkEditorViewTest, ModelsMatch);
+ FRIEND_TEST(BookmarkEditorViewTest, MoveToNewParent);
public:
// Shows the BookmarkEditorView editing the specified entry.
static void Show(HWND parent_window,
@@ -194,9 +200,13 @@ class BookmarkEditorView : public ChromeViews::View,
BookmarkNode* FindNodeWithID(BookmarkEditorView::BookmarkNode* node,
history::UIStarID id);
- // Applies the edits done by the user.
+ // Invokes ApplyEdits with the selected node.
void ApplyEdits();
+ // Applies the edits done by the user. |parent| gives the parent of the URL
+ // being edited.
+ void ApplyEdits(BookmarkNode* parent);
+
// Recursively adds newly created groups and sets the title of nodes to
// match the user edited title.
//
@@ -227,6 +237,11 @@ class BookmarkEditorView : public ChromeViews::View,
// editing on the new gorup as well.
void NewGroup();
+ // Creates a new BookmarkNode as the last child of parent. The new node is
+ // added to the model and returned. This does NOT start editing. This is used
+ // internally by NewGroup and broken into a separate method for testing.
+ BookmarkNode* AddNewGroup(BookmarkNode* parent);
+
// Profile the entry is from.
Profile* profile_;