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

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

Issue 2907253003: Replace deprecated base::NonThreadSafe in chrome/browser/profiles. (Closed)
Patch Set: Android crashes?? Revert improvement to chrome_network_delegate_unittest.cc... Created 3 years, 6 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 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 base::StringPrintf("testing_profile_gaia%" PRIuS, number_of_profiles), 126 base::StringPrintf("testing_profile_gaia%" PRIuS, number_of_profiles),
127 base::ASCIIToUTF16(base::StringPrintf("testing_profile_user%" PRIuS, 127 base::ASCIIToUTF16(base::StringPrintf("testing_profile_user%" PRIuS,
128 number_of_profiles)), 128 number_of_profiles)),
129 number_of_profiles, 129 number_of_profiles,
130 std::string("")); 130 std::string(""));
131 131
132 EXPECT_EQ(number_of_profiles + 1, storage()->GetNumberOfProfiles()); 132 EXPECT_EQ(number_of_profiles + 1, storage()->GetNumberOfProfiles());
133 } 133 }
134 134
135 private: 135 private:
136 content::TestBrowserThreadBundle thread_bundle_;
136 TestingProfileManager testing_profile_manager_; 137 TestingProfileManager testing_profile_manager_;
137 content::TestBrowserThreadBundle thread_bundle_;
138 }; 138 };
139 139
140 class ProfileAttributesTestObserver 140 class ProfileAttributesTestObserver
141 : public ProfileAttributesStorage::Observer { 141 : public ProfileAttributesStorage::Observer {
142 public: 142 public:
143 MOCK_METHOD1(OnProfileSigninRequiredChanged, 143 MOCK_METHOD1(OnProfileSigninRequiredChanged,
144 void(const base::FilePath& profile_path)); 144 void(const base::FilePath& profile_path));
145 }; 145 };
146 146
147 TEST_F(ProfileAttributesStorageTest, ProfileNotFound) { 147 TEST_F(ProfileAttributesStorageTest, ProfileNotFound) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 EXPECT_CALL(observer, OnProfileSigninRequiredChanged(_)).Times(1); 468 EXPECT_CALL(observer, OnProfileSigninRequiredChanged(_)).Times(1);
469 entry->LockForceSigninProfile(true); 469 entry->LockForceSigninProfile(true);
470 ASSERT_TRUE(entry->IsSigninRequired()); 470 ASSERT_TRUE(entry->IsSigninRequired());
471 Mock::VerifyAndClear(&observer); 471 Mock::VerifyAndClear(&observer);
472 472
473 EXPECT_CALL(observer, OnProfileSigninRequiredChanged(_)).Times(1); 473 EXPECT_CALL(observer, OnProfileSigninRequiredChanged(_)).Times(1);
474 entry->SetIsSigninRequired(false); 474 entry->SetIsSigninRequired(false);
475 ASSERT_FALSE(entry->IsSigninRequired()); 475 ASSERT_FALSE(entry->IsSigninRequired());
476 Mock::VerifyAndClear(&observer); 476 Mock::VerifyAndClear(&observer);
477 } 477 }
OLDNEW
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor_unittest.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698