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

Side by Side Diff: chrome/browser/profiles/profile_attributes_storage_unittest.cc

Issue 2192033002: chrome/browser/profiles: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | chrome/browser/profiles/profile_browsertest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 GetProfilePath("testing_profile_path0"), &entry)); 204 GetProfilePath("testing_profile_path0"), &entry));
205 EXPECT_EQ(base::ASCIIToUTF16("testing_profile_name0"), entry->GetName()); 205 EXPECT_EQ(base::ASCIIToUTF16("testing_profile_name0"), entry->GetName());
206 206
207 storage()->RemoveProfile(GetProfilePath("testing_profile_path0")); 207 storage()->RemoveProfile(GetProfilePath("testing_profile_path0"));
208 ASSERT_FALSE(storage()->GetProfileAttributesWithPath( 208 ASSERT_FALSE(storage()->GetProfileAttributesWithPath(
209 GetProfilePath("testing_profile_path0"), &entry)); 209 GetProfilePath("testing_profile_path0"), &entry));
210 EXPECT_EQ(4U, storage()->GetNumberOfProfiles()); 210 EXPECT_EQ(4U, storage()->GetNumberOfProfiles());
211 211
212 std::vector<ProfileAttributesEntry*> entries = 212 std::vector<ProfileAttributesEntry*> entries =
213 storage()->GetAllProfilesAttributes(); 213 storage()->GetAllProfilesAttributes();
214 for (auto& entry : entries) { 214 for (auto* entry : entries) {
215 EXPECT_NE(GetProfilePath("testing_profile_path0"), entry->GetPath()); 215 EXPECT_NE(GetProfilePath("testing_profile_path0"), entry->GetPath());
216 } 216 }
217 } 217 }
218 218
219 TEST_F(ProfileAttributesStorageTest, InitialValues) { 219 TEST_F(ProfileAttributesStorageTest, InitialValues) {
220 AddTestingProfile(); 220 AddTestingProfile();
221 221
222 ProfileAttributesEntry* entry; 222 ProfileAttributesEntry* entry;
223 ASSERT_TRUE(storage()->GetProfileAttributesWithPath( 223 ASSERT_TRUE(storage()->GetProfileAttributesWithPath(
224 GetProfilePath("testing_profile_path0"), &entry)); 224 GetProfilePath("testing_profile_path0"), &entry));
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 icon_index, 429 icon_index,
430 std::string()); 430 std::string());
431 } 431 }
432 432
433 for (int iter = 0; iter < num_iterations; ++iter) { 433 for (int iter = 0; iter < num_iterations; ++iter) {
434 // All icons are used up, expect any valid icon. 434 // All icons are used up, expect any valid icon.
435 ASSERT_GT(total_icon_count, 435 ASSERT_GT(total_icon_count,
436 storage()->ChooseAvatarIconIndexForNewProfile()); 436 storage()->ChooseAvatarIconIndexForNewProfile());
437 } 437 }
438 } 438 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698