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

Side by Side Diff: ui/views/controls/button/label_button_unittest.cc

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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 | « ui/surface/accelerated_surface_mac.h ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | 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) 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/button/label_button.h" 5 #include "ui/views/controls/button/label_button.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/font_list.h" 10 #include "ui/gfx/font_list.h"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/text_utils.h" 12 #include "ui/gfx/text_utils.h"
13 #include "ui/views/test/views_test_base.h" 13 #include "ui/views/test/views_test_base.h"
14 14
15 using base::ASCIIToUTF16; 15 using base::ASCIIToUTF16;
16 16
17 namespace { 17 namespace {
18 18
19 gfx::ImageSkia CreateTestImage(int width, int height) { 19 gfx::ImageSkia CreateTestImage(int width, int height) {
20 SkBitmap bitmap; 20 SkBitmap bitmap;
21 bitmap.allocN32Pixels(width, height); 21 bitmap.allocN32Pixels(width, height);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 button.SetImageLabelSpacing(2 * kOriginalSpacing); 219 button.SetImageLabelSpacing(2 * kOriginalSpacing);
220 EXPECT_GT(button.GetPreferredSize().width(), original_width); 220 EXPECT_GT(button.GetPreferredSize().width(), original_width);
221 221
222 // The button shrinks if the original spacing is restored. 222 // The button shrinks if the original spacing is restored.
223 button.SetMinSize(gfx::Size()); 223 button.SetMinSize(gfx::Size());
224 button.SetImageLabelSpacing(kOriginalSpacing); 224 button.SetImageLabelSpacing(kOriginalSpacing);
225 EXPECT_EQ(original_width, button.GetPreferredSize().width()); 225 EXPECT_EQ(original_width, button.GetPreferredSize().width());
226 } 226 }
227 227
228 } // namespace views 228 } // namespace views
OLDNEW
« no previous file with comments | « ui/surface/accelerated_surface_mac.h ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698