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

Side by Side Diff: chrome/common/web_apps_unittest.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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
« no previous file with comments | « chrome/common/unix_domain_socket_posix.cc ('k') | chrome/renderer/render_thread.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) 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 "chrome/common/web_apps.h" 5 #include "chrome/common/web_apps.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 }; 171 };
172 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) { 172 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
173 bool is_any; 173 bool is_any;
174 std::vector<gfx::Size> sizes; 174 std::vector<gfx::Size> sizes;
175 bool result = web_apps::ParseIconSizes(ASCIIToUTF16(data[i].input), &sizes, 175 bool result = web_apps::ParseIconSizes(ASCIIToUTF16(data[i].input), &sizes,
176 &is_any); 176 &is_any);
177 ASSERT_EQ(result, data[i].expected_result); 177 ASSERT_EQ(result, data[i].expected_result);
178 if (result) { 178 if (result) {
179 ASSERT_EQ(data[i].is_any, is_any); 179 ASSERT_EQ(data[i].is_any, is_any);
180 ASSERT_EQ(data[i].expected_size_count, sizes.size()); 180 ASSERT_EQ(data[i].expected_size_count, sizes.size());
181 if (sizes.size() > 0) { 181 if (!sizes.empty()) {
182 ASSERT_EQ(data[i].width1, sizes[0].width()); 182 ASSERT_EQ(data[i].width1, sizes[0].width());
183 ASSERT_EQ(data[i].height1, sizes[0].height()); 183 ASSERT_EQ(data[i].height1, sizes[0].height());
184 } 184 }
185 if (sizes.size() > 1) { 185 if (sizes.size() > 1) {
186 ASSERT_EQ(data[i].width2, sizes[1].width()); 186 ASSERT_EQ(data[i].width2, sizes[1].width());
187 ASSERT_EQ(data[i].height2, sizes[1].height()); 187 ASSERT_EQ(data[i].height2, sizes[1].height());
188 } 188 }
189 } 189 }
190 } 190 }
191 } 191 }
OLDNEW
« no previous file with comments | « chrome/common/unix_domain_socket_posix.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698