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/views/view_model.h" | 5 #include "ui/views/view_model.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Returns a string containing the x-coordinate of each of the views in |model|. | 15 // Returns a string containing the x-coordinate of each of the views in |model|. |
16 std::string BoundsString(const ViewModel& model) { | 16 std::string BoundsString(const ViewModel& model) { |
17 std::string result; | 17 std::string result; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 model.MoveViewOnly(0, 1); | 87 model.MoveViewOnly(0, 1); |
88 EXPECT_EQ("1 0 2", ViewIDsString(model)); | 88 EXPECT_EQ("1 0 2", ViewIDsString(model)); |
89 EXPECT_EQ("10 11 12", BoundsString(model)); | 89 EXPECT_EQ("10 11 12", BoundsString(model)); |
90 | 90 |
91 model.MoveViewOnly(1, 0); | 91 model.MoveViewOnly(1, 0); |
92 EXPECT_EQ("0 1 2", ViewIDsString(model)); | 92 EXPECT_EQ("0 1 2", ViewIDsString(model)); |
93 EXPECT_EQ("10 11 12", BoundsString(model)); | 93 EXPECT_EQ("10 11 12", BoundsString(model)); |
94 } | 94 } |
95 | 95 |
96 } // namespace views | 96 } // namespace views |
OLD | NEW |