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

Side by Side Diff: chrome/browser/ui/tabs/dock_info_unittest.cc

Issue 6300001: Clang: enable -Wbool-conversions and -Wunused-variables on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, undo indent Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "chrome/browser/ui/tabs/dock_info.h" 6 #include "chrome/browser/ui/tabs/dock_info.h"
7 #include "gfx/point.h" 7 #include "gfx/point.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 }; 117 };
118 118
119 for (size_t i = 0; i < arraysize(expected_result); ++i) { 119 for (size_t i = 0; i < arraysize(expected_result); ++i) {
120 EXPECT_EQ(expected_result[i], d.IsValidForPoint(screen_point[i])); 120 EXPECT_EQ(expected_result[i], d.IsValidForPoint(screen_point[i]));
121 } 121 }
122 } 122 }
123 123
124 TEST(DockInfoTest, equals) { 124 TEST(DockInfoTest, equals) {
125 DockInfo d; 125 DockInfo d;
126 DockInfo dd; 126 DockInfo dd;
127 EXPECT_EQ(true, d.equals(dd)); 127 EXPECT_TRUE(d.equals(dd));
128 d.set_type(DockInfo::MAXIMIZE); 128 d.set_type(DockInfo::MAXIMIZE);
129 EXPECT_FALSE(d.equals(dd)); 129 EXPECT_FALSE(d.equals(dd));
130 } 130 }
131 131
132 TEST(DockInfoTest, CheckMonitorPoint) { 132 TEST(DockInfoTest, CheckMonitorPoint) {
133 DockInfo d; 133 DockInfo d;
134 gfx::Point screen_loc[] = { 134 gfx::Point screen_loc[] = {
135 gfx::Point(0, 0), 135 gfx::Point(0, 0),
136 gfx::Point(2 * kHotSpotDeltaX, kHotSpotDeltaY), 136 gfx::Point(2 * kHotSpotDeltaX, kHotSpotDeltaY),
137 gfx::Point(2 * kHotSpotDeltaX, kHotSpotDeltaY), 137 gfx::Point(2 * kHotSpotDeltaX, kHotSpotDeltaY),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 for (size_t i = 0; i < arraysize(type); ++i) { 183 for (size_t i = 0; i < arraysize(type); ++i) {
184 d.set_type(type[i]); 184 d.set_type(type[i]);
185 gfx::Rect result = d.GetPopupRect(); 185 gfx::Rect result = d.GetPopupRect();
186 EXPECT_EQ(expected_x[i], result.x()); 186 EXPECT_EQ(expected_x[i], result.x());
187 EXPECT_EQ(expected_y[i], result.y()); 187 EXPECT_EQ(expected_y[i], result.y());
188 EXPECT_EQ(kPopupWidth, result.width()); 188 EXPECT_EQ(kPopupWidth, result.width());
189 EXPECT_EQ(kPopupHeight, result.height()); 189 EXPECT_EQ(kPopupHeight, result.height());
190 } 190 }
191 } 191 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/options/languages_page_gtk_unittest.cc ('k') | chrome/common/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698