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

Side by Side Diff: ash/frame/default_header_painter_unittest.cc

Issue 948703002: [gcc] Fix compiler warning turned into errors while compiling default_header_painter_unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch for landing Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/frame/default_header_painter.h" 5 #include "ash/frame/default_header_painter.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 views::StaticSizedView window_icon(gfx::Size(16, 16)); 60 views::StaticSizedView window_icon(gfx::Size(16, 16));
61 window_icon.SetBounds(0, 0, 16, 16); 61 window_icon.SetBounds(0, 0, 16, 16);
62 w->SetBounds(gfx::Rect(0, 0, 500, 500)); 62 w->SetBounds(gfx::Rect(0, 0, 500, 500));
63 w->Show(); 63 w->Show();
64 64
65 DefaultHeaderPainter painter; 65 DefaultHeaderPainter painter;
66 painter.Init(w.get(), w->non_client_view()->frame_view(), &container); 66 painter.Init(w.get(), w->non_client_view()->frame_view(), &container);
67 67
68 // Check by default light icons are not used. 68 // Check by default light icons are not used.
69 painter.mode_ = HeaderPainter::MODE_ACTIVE; 69 painter.mode_ = HeaderPainter::MODE_ACTIVE;
70 EXPECT_EQ(false, painter.ShouldUseLightImages()); 70 EXPECT_FALSE(painter.ShouldUseLightImages());
71 painter.mode_ = HeaderPainter::MODE_INACTIVE; 71 painter.mode_ = HeaderPainter::MODE_INACTIVE;
72 EXPECT_EQ(false, painter.ShouldUseLightImages()); 72 EXPECT_FALSE(painter.ShouldUseLightImages());
73 73
74 // Check that setting dark colors should use light icons. 74 // Check that setting dark colors should use light icons.
75 painter.SetFrameColors(SkColorSetRGB(0, 0, 0), SkColorSetRGB(0, 0, 0)); 75 painter.SetFrameColors(SkColorSetRGB(0, 0, 0), SkColorSetRGB(0, 0, 0));
76 painter.mode_ = HeaderPainter::MODE_ACTIVE; 76 painter.mode_ = HeaderPainter::MODE_ACTIVE;
77 EXPECT_EQ(true, painter.ShouldUseLightImages()); 77 EXPECT_TRUE(painter.ShouldUseLightImages());
78 painter.mode_ = HeaderPainter::MODE_INACTIVE; 78 painter.mode_ = HeaderPainter::MODE_INACTIVE;
79 EXPECT_EQ(true, painter.ShouldUseLightImages()); 79 EXPECT_TRUE(painter.ShouldUseLightImages());
80 80
81 // Check that inactive and active colors are used properly. 81 // Check that inactive and active colors are used properly.
82 painter.SetFrameColors(SkColorSetRGB(0, 0, 0), SkColorSetRGB(255, 255, 255)); 82 painter.SetFrameColors(SkColorSetRGB(0, 0, 0), SkColorSetRGB(255, 255, 255));
83 painter.mode_ = HeaderPainter::MODE_ACTIVE; 83 painter.mode_ = HeaderPainter::MODE_ACTIVE;
84 EXPECT_EQ(true, painter.ShouldUseLightImages()); 84 EXPECT_TRUE(painter.ShouldUseLightImages());
85 painter.mode_ = HeaderPainter::MODE_INACTIVE; 85 painter.mode_ = HeaderPainter::MODE_INACTIVE;
86 EXPECT_EQ(false, painter.ShouldUseLightImages()); 86 EXPECT_FALSE(painter.ShouldUseLightImages());
87 87
88 // Check not so light or dark colors. 88 // Check not so light or dark colors.
89 painter.SetFrameColors(SkColorSetRGB(70, 70, 70), 89 painter.SetFrameColors(SkColorSetRGB(70, 70, 70),
90 SkColorSetRGB(200, 200, 200)); 90 SkColorSetRGB(200, 200, 200));
91 painter.mode_ = HeaderPainter::MODE_ACTIVE; 91 painter.mode_ = HeaderPainter::MODE_ACTIVE;
92 EXPECT_EQ(true, painter.ShouldUseLightImages()); 92 EXPECT_TRUE(painter.ShouldUseLightImages());
93 painter.mode_ = HeaderPainter::MODE_INACTIVE; 93 painter.mode_ = HeaderPainter::MODE_INACTIVE;
94 EXPECT_EQ(false, painter.ShouldUseLightImages()); 94 EXPECT_FALSE(painter.ShouldUseLightImages());
95 } 95 }
96 96
97 } // namespace ash 97 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698