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/controls/table/table_utils.h" | 5 #include "ui/views/controls/table/table_utils.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/gfx/font.h" | 9 #include "ui/gfx/font.h" |
10 #include "ui/views/controls/table/test_table_model.h" | 10 #include "ui/views/controls/table/test_table_model.h" |
11 | 11 |
12 using ui::TableColumn; | 12 using ui::TableColumn; |
13 using ui::TableModel; | 13 using ui::TableModel; |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 | 16 |
17 namespace { | 17 namespace { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 CalculateTableColumnSizes(1000, 0, font, font, 0, 0, columns, &model); | 105 CalculateTableColumnSizes(1000, 0, font, font, 0, 0, columns, &model); |
106 result = CalculateTableColumnSizes(result[0] + result[1], 0, font, font, 0, 0, | 106 result = CalculateTableColumnSizes(result[0] + result[1], 0, font, font, 0, 0, |
107 columns, &model); | 107 columns, &model); |
108 EXPECT_EQ(result[0], WidthForContent(font, font, 0, 0, columns[0], &model)); | 108 EXPECT_EQ(result[0], WidthForContent(font, font, 0, 0, columns[0], &model)); |
109 EXPECT_EQ(result[1], WidthForContent(font, font, 0, 0, columns[1], &model)); | 109 EXPECT_EQ(result[1], WidthForContent(font, font, 0, 0, columns[1], &model)); |
110 EXPECT_EQ(kUnspecifiedColumnWidth, result[2]); | 110 EXPECT_EQ(kUnspecifiedColumnWidth, result[2]); |
111 } | 111 } |
112 | 112 |
113 } // namespace views | 113 } // namespace views |
114 | 114 |
OLD | NEW |