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

Side by Side Diff: app/tree_node_model_unittest.cc

Issue 3111024: Remove wstrings from bookmarks, part 9. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « app/tree_node_model.h ('k') | no next file » | 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) 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 "app/tree_node_model.h" 5 #include "app/tree_node_model.h"
6 #include "base/string16.h" 6 #include "base/string16.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 class TreeNodeModelTest : public testing::Test, public TreeModelObserver { 10 class TreeNodeModelTest : public testing::Test, public TreeModelObserver {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Makes sure that we are notified when the node is renamed, 274 // Makes sure that we are notified when the node is renamed,
275 // also makes sure the node is properly renamed. 275 // also makes sure the node is properly renamed.
276 TEST_F(TreeNodeModelTest, SetTitle) { 276 TEST_F(TreeNodeModelTest, SetTitle) {
277 TreeNodeWithValue<int>* root = 277 TreeNodeWithValue<int>* root =
278 new TreeNodeWithValue<int>(L"root", 0); 278 new TreeNodeWithValue<int>(L"root", 0);
279 TreeNodeModel<TreeNodeWithValue<int> > model(root); 279 TreeNodeModel<TreeNodeWithValue<int> > model(root);
280 model.AddObserver(this); 280 model.AddObserver(this);
281 ClearCounts(); 281 ClearCounts();
282 282
283 const string16 title(ASCIIToUTF16("root2")); 283 const string16 title(ASCIIToUTF16("root2"));
284 model.SetTitle(root, UTF16ToWideHack(title)); 284 model.SetTitle(root, title);
285 AssertObserverCount(0, 0, 1); 285 AssertObserverCount(0, 0, 1);
286 EXPECT_EQ(title, root->GetTitleAsString16()); 286 EXPECT_EQ(title, root->GetTitleAsString16());
287 } 287 }
OLDNEW
« no previous file with comments | « app/tree_node_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698