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

Side by Side Diff: chrome/browser/signin/local_auth_unittest.cc

Issue 674273002: Cleanup: Remove unneeded chrome/common/pref_names.h includes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 "chrome/browser/signin/local_auth.h" 5 #include "chrome/browser/signin/local_auth.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/common/pref_names.h"
11 #include "chrome/test/base/testing_browser_process.h" 10 #include "chrome/test/base/testing_browser_process.h"
12 #include "chrome/test/base/testing_pref_service_syncable.h" 11 #include "chrome/test/base/testing_pref_service_syncable.h"
13 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
14 #include "chrome/test/base/testing_profile_manager.h" 13 #include "chrome/test/base/testing_profile_manager.h"
15 #include "components/os_crypt/os_crypt.h" 14 #include "components/os_crypt/os_crypt.h"
16 15
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 17
19 using namespace chrome; 18 using namespace chrome;
20 19
(...skipping 29 matching lines...) Expand all
50 base::Base64Decode(passhash.substr(1), &decodedhash); 49 base::Base64Decode(passhash.substr(1), &decodedhash);
51 EXPECT_FALSE(decodedhash.empty()); 50 EXPECT_FALSE(decodedhash.empty());
52 EXPECT_EQ(decodedhash.find(password), std::string::npos); 51 EXPECT_EQ(decodedhash.find(password), std::string::npos);
53 52
54 EXPECT_TRUE(ValidateLocalAuthCredentials(prof, password)); 53 EXPECT_TRUE(ValidateLocalAuthCredentials(prof, password));
55 EXPECT_FALSE(ValidateLocalAuthCredentials(prof, password + "1")); 54 EXPECT_FALSE(ValidateLocalAuthCredentials(prof, password + "1"));
56 55
57 SetLocalAuthCredentials(prof, password); // makes different salt 56 SetLocalAuthCredentials(prof, password); // makes different salt
58 EXPECT_NE(passhash, cache.GetLocalAuthCredentialsOfProfileAtIndex(0)); 57 EXPECT_NE(passhash, cache.GetLocalAuthCredentialsOfProfileAtIndex(0));
59 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/spellchecker/spellcheck_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698