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

Side by Side Diff: chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, Basic) { 251 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, Basic) {
252 struct { 252 struct {
253 const char* query; 253 const char* query;
254 const char* mock_server_response; 254 const char* mock_server_response;
255 const char* expected_results_content; 255 const char* expected_results_content;
256 } kTestCases[] = { 256 } kTestCases[] = {
257 {"first", kOneResult, "first person" }, 257 {"first", kOneResult, "first person" },
258 {"person", kThreeValidResults, "first person,second person,third person" }, 258 {"person", kThreeValidResults, "first person,second person,third person" },
259 }; 259 };
260 260
261 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { 261 for (size_t i = 0; i < arraysize(kTestCases); ++i) {
262 EXPECT_EQ(kTestCases[i].expected_results_content, 262 EXPECT_EQ(kTestCases[i].expected_results_content,
263 RunQuery(kTestCases[i].query, 263 RunQuery(kTestCases[i].query,
264 kTestCases[i].mock_server_response)) 264 kTestCases[i].mock_server_response))
265 << "Case " << i << ": q=" << kTestCases[i].query; 265 << "Case " << i << ": q=" << kTestCases[i].query;
266 } 266 }
267 } 267 }
268 268
269 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, NoSearchForSensitiveData) { 269 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, NoSearchForSensitiveData) {
270 // None of the following input strings should be accepted because they may 270 // None of the following input strings should be accepted because they may
271 // contain private data. 271 // contain private data.
(...skipping 16 matching lines...) Expand all
288 } 288 }
289 289
290 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, NoSearchForShortQueries) { 290 IN_PROC_BROWSER_TEST_F(PeopleProviderTest, NoSearchForShortQueries) {
291 EXPECT_EQ("", RunQuery("f", kOneResult)); 291 EXPECT_EQ("", RunQuery("f", kOneResult));
292 EXPECT_EQ("", RunQuery("fi", kOneResult)); 292 EXPECT_EQ("", RunQuery("fi", kOneResult));
293 EXPECT_EQ("first person", RunQuery("fir", kOneResult)); 293 EXPECT_EQ("first person", RunQuery("fir", kOneResult));
294 } 294 }
295 295
296 } // namespace test 296 } // namespace test
297 } // namespace app_list 297 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698