| 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 "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" | 5 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/string_util.h" | |
| 10 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_util.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
| 13 #include "ui/views/view_model.h" | 13 #include "ui/views/view_model.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 struct CommonTestData { | 17 struct CommonTestData { |
| 18 const int initial_x; | 18 const int initial_x; |
| 19 const int width; | 19 const int width; |
| 20 const int tab_size; | 20 const int tab_size; |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // Location can be honored. | 551 // Location can be honored. |
| 552 { { 0, 300, 100, -10, 2, 0, 3, "", "0 2 4 40 130 198 200" }, 40 }, | 552 { { 0, 300, 100, -10, 2, 0, 3, "", "0 2 4 40 130 198 200" }, 40 }, |
| 553 }; | 553 }; |
| 554 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { | 554 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { |
| 555 CreateLayout(test_data[i].common_data); | 555 CreateLayout(test_data[i].common_data); |
| 556 layout_->SetActiveTabLocation(test_data[i].location); | 556 layout_->SetActiveTabLocation(test_data[i].location); |
| 557 EXPECT_EQ(test_data[i].common_data.expected_bounds, BoundsString()) << | 557 EXPECT_EQ(test_data[i].common_data.expected_bounds, BoundsString()) << |
| 558 " at " << i; | 558 " at " << i; |
| 559 } | 559 } |
| 560 } | 560 } |
| OLD | NEW |