OLD | NEW |
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/base/models/tree_node_model.h" | 5 #include "ui/base/models/tree_node_model.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class TreeNodeModelTest : public testing::Test, public TreeModelObserver { | 17 class TreeNodeModelTest : public testing::Test, public TreeModelObserver { |
18 public: | 18 public: |
19 TreeNodeModelTest() | 19 TreeNodeModelTest() |
20 : added_count_(0), | 20 : added_count_(0), |
21 removed_count_(0), | 21 removed_count_(0), |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 TEST_F(TreeNodeModelTest, IsRoot) { | 312 TEST_F(TreeNodeModelTest, IsRoot) { |
313 TestNode root; | 313 TestNode root; |
314 EXPECT_TRUE(root.is_root()); | 314 EXPECT_TRUE(root.is_root()); |
315 | 315 |
316 TestNode* child1 = new TestNode; | 316 TestNode* child1 = new TestNode; |
317 root.Add(child1, root.child_count()); | 317 root.Add(child1, root.child_count()); |
318 EXPECT_FALSE(child1->is_root()); | 318 EXPECT_FALSE(child1->is_root()); |
319 } | 319 } |
320 | 320 |
321 } // namespace ui | 321 } // namespace ui |
OLD | NEW |