Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: ui/views/controls/tree/tree_view_views_unittest.cc

Issue 9897003: Fix grammatical errors in comments in ui/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/tree/tree_view_views.h" 5 #include "ui/views/controls/tree/tree_view_views.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 TEST_F(TreeViewViewsTest, TreeNodesRemoved) { 235 TEST_F(TreeViewViewsTest, TreeNodesRemoved) {
236 // Add c1 as a child of c and c11 as a child of c1. 236 // Add c1 as a child of c and c11 as a child of c1.
237 Add(Add(GetNodeByTitle("c"), 0, "c1"), 0, "c11"); 237 Add(Add(GetNodeByTitle("c"), 0, "c1"), 0, "c11");
238 tree_.SetModel(&model_); 238 tree_.SetModel(&model_);
239 239
240 // Remove c11, which shouldn't have any effect on the tree. 240 // Remove c11, which shouldn't have any effect on the tree.
241 EXPECT_EQ("root [a b c]", TreeViewContentsAsString()); 241 EXPECT_EQ("root [a b c]", TreeViewContentsAsString());
242 EXPECT_EQ("root", GetSelectedNodeTitle()); 242 EXPECT_EQ("root", GetSelectedNodeTitle());
243 EXPECT_EQ(4, GetRowCount()); 243 EXPECT_EQ(4, GetRowCount());
244 244
245 // Expand b1, then collapse it and remove it's only child, b1. This shouldn't 245 // Expand b1, then collapse it and remove its only child, b1. This shouldn't
246 // effect the tree. 246 // effect the tree.
247 tree_.Expand(GetNodeByTitle("b")); 247 tree_.Expand(GetNodeByTitle("b"));
248 tree_.Collapse(GetNodeByTitle("b")); 248 tree_.Collapse(GetNodeByTitle("b"));
249 delete model_.Remove(GetNodeByTitle("b1")->parent(), GetNodeByTitle("b1")); 249 delete model_.Remove(GetNodeByTitle("b1")->parent(), GetNodeByTitle("b1"));
250 EXPECT_EQ("root [a b c]", TreeViewContentsAsString()); 250 EXPECT_EQ("root [a b c]", TreeViewContentsAsString());
251 EXPECT_EQ("root", GetSelectedNodeTitle()); 251 EXPECT_EQ("root", GetSelectedNodeTitle());
252 EXPECT_EQ(4, GetRowCount()); 252 EXPECT_EQ(4, GetRowCount());
253 253
254 // Remove 'b'. 254 // Remove 'b'.
255 delete model_.Remove(GetNodeByTitle("b")->parent(), GetNodeByTitle("b")); 255 delete model_.Remove(GetNodeByTitle("b")->parent(), GetNodeByTitle("b"));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 EXPECT_EQ("b", GetSelectedNodeTitle()); 375 EXPECT_EQ("b", GetSelectedNodeTitle());
376 ExpandOrSelectChild(); 376 ExpandOrSelectChild();
377 EXPECT_EQ("root [a b [b1] c]", TreeViewContentsAsString()); 377 EXPECT_EQ("root [a b [b1] c]", TreeViewContentsAsString());
378 EXPECT_EQ("b1", GetSelectedNodeTitle()); 378 EXPECT_EQ("b1", GetSelectedNodeTitle());
379 ExpandOrSelectChild(); 379 ExpandOrSelectChild();
380 EXPECT_EQ("root [a b [b1] c]", TreeViewContentsAsString()); 380 EXPECT_EQ("root [a b [b1] c]", TreeViewContentsAsString());
381 EXPECT_EQ("b1", GetSelectedNodeTitle()); 381 EXPECT_EQ("b1", GetSelectedNodeTitle());
382 } 382 }
383 383
384 } // namespace views 384 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698