diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 01:38:50 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 01:38:50 +0000 |
commit | 3ce9f01e0678bcdf044efeb871fef4179573a3bc (patch) | |
tree | 3fbc53f60a12953d163d32802cfa56fe5a062dd4 /app | |
parent | 071f94e501d86db8dfa2a3c0806a2388216bb239 (diff) | |
download | chromium_src-3ce9f01e0678bcdf044efeb871fef4179573a3bc.zip chromium_src-3ce9f01e0678bcdf044efeb871fef4179573a3bc.tar.gz chromium_src-3ce9f01e0678bcdf044efeb871fef4179573a3bc.tar.bz2 |
Cleanup: Get rid of TreeNodeChildrenReordered.
Reason: This function was never implemented by TreeNodeModel and is unlike it
will be. Also it proved to not be necessary at all.
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/3091016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/tree_model.h | 5 | ||||
-rw-r--r-- | app/tree_node_model_unittest.cc | 17 |
2 files changed, 5 insertions, 17 deletions
diff --git a/app/tree_model.h b/app/tree_model.h index 353b56b..e191745 100644 --- a/app/tree_model.h +++ b/app/tree_model.h @@ -42,11 +42,6 @@ class TreeModelObserver { int start, int count) = 0; - // Notification the children of |parent| have been reordered. Note, only - // the direct children of |parent| have been reordered, not descendants. - virtual void TreeNodeChildrenReordered(TreeModel* model, - TreeModelNode* parent) = 0; - // Notification that the contents of a node has changed. virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) = 0; diff --git a/app/tree_node_model_unittest.cc b/app/tree_node_model_unittest.cc index 3b32495..ce12b16 100644 --- a/app/tree_node_model_unittest.cc +++ b/app/tree_node_model_unittest.cc @@ -10,19 +10,17 @@ class TreeNodeModelTest : public testing::Test, public TreeModelObserver { TreeNodeModelTest() : added_count_(0), removed_count_(0), - reordered_count_(0), changed_count_(0) {} void AssertObserverCount(int added_count, int removed_count, - int reordered_count, int changed_count) { + int changed_count) { ASSERT_EQ(added_count, added_count_); ASSERT_EQ(removed_count, removed_count_); - ASSERT_EQ(reordered_count, reordered_count_); ASSERT_EQ(changed_count, changed_count_); } void ClearCounts() { - added_count_ = removed_count_ = reordered_count_ = changed_count_ = 0; + added_count_ = removed_count_ = changed_count_ = 0; } // Begin TreeModelObserver implementation. @@ -34,10 +32,6 @@ class TreeNodeModelTest : public testing::Test, public TreeModelObserver { int start, int count) { removed_count_++; } - virtual void TreeNodeChildrenReordered(TreeModel* model, - TreeModelNode* parent) { - reordered_count_++; - } virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) { changed_count_++; } @@ -46,7 +40,6 @@ class TreeNodeModelTest : public testing::Test, public TreeModelObserver { private: int added_count_; int removed_count_; - int reordered_count_; int changed_count_; DISALLOW_COPY_AND_ASSIGN(TreeNodeModelTest); @@ -72,7 +65,7 @@ TEST_F(TreeNodeModelTest, AddNode) { new TreeNodeWithValue<int>(L"child 1", 1); model.Add(root, 0, child1); - AssertObserverCount(1, 0, 0, 0); + AssertObserverCount(1, 0, 0); // Add two nodes under the |child1|. TreeNodeWithValue<int>* foo1 = @@ -118,7 +111,7 @@ TEST_F(TreeNodeModelTest, RemoveNode) { // Now remove the |child1| from root and release the memory. delete model.Remove(root, 0); - AssertObserverCount(0, 1, 0, 0); + AssertObserverCount(0, 1, 0); ASSERT_EQ(0, model.GetChildCount(root)); } @@ -287,6 +280,6 @@ TEST_F(TreeNodeModelTest, SetTitle) { const std::wstring title(L"root2"); model.SetTitle(root, title); - AssertObserverCount(0, 0, 0, 1); + AssertObserverCount(0, 0, 1); EXPECT_EQ(WideToUTF16(title), root->GetTitleAsString16()); } |