OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" | 4 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" |
5 | 5 |
6 #include "base/values.h" | 6 #include "base/values.h" |
7 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 7 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
8 #include "chromeos/login/auth/key.h" | 8 #include "chromeos/login/auth/key.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 class SupervisedUserAuthenticationTest : public testing::Test { | 13 class SupervisedUserAuthenticationTest : public testing::Test { |
14 protected: | 14 protected: |
15 SupervisedUserAuthenticationTest(); | 15 SupervisedUserAuthenticationTest(); |
16 virtual ~SupervisedUserAuthenticationTest(); | 16 virtual ~SupervisedUserAuthenticationTest(); |
17 | 17 |
18 // testing::Test: | 18 // testing::Test: |
19 virtual void SetUp() OVERRIDE; | 19 virtual void SetUp() override; |
20 virtual void TearDown() OVERRIDE; | 20 virtual void TearDown() override; |
21 | 21 |
22 DISALLOW_COPY_AND_ASSIGN(SupervisedUserAuthenticationTest); | 22 DISALLOW_COPY_AND_ASSIGN(SupervisedUserAuthenticationTest); |
23 }; | 23 }; |
24 | 24 |
25 SupervisedUserAuthenticationTest::SupervisedUserAuthenticationTest() {} | 25 SupervisedUserAuthenticationTest::SupervisedUserAuthenticationTest() {} |
26 | 26 |
27 SupervisedUserAuthenticationTest::~SupervisedUserAuthenticationTest() {} | 27 SupervisedUserAuthenticationTest::~SupervisedUserAuthenticationTest() {} |
28 | 28 |
29 void SupervisedUserAuthenticationTest::SetUp() {} | 29 void SupervisedUserAuthenticationTest::SetUp() {} |
30 | 30 |
(...skipping 12 matching lines...) Expand all Loading... |
43 | 43 |
44 Key key(password); | 44 Key key(password); |
45 key.Transform(Key::KEY_TYPE_SALTED_PBKDF2_AES256_1234, salt); | 45 key.Transform(Key::KEY_TYPE_SALTED_PBKDF2_AES256_1234, salt); |
46 ASSERT_EQ(expected_salted_password, key.GetSecret()); | 46 ASSERT_EQ(expected_salted_password, key.GetSecret()); |
47 std::string signature = SupervisedUserAuthentication::BuildPasswordSignature( | 47 std::string signature = SupervisedUserAuthentication::BuildPasswordSignature( |
48 key.GetSecret(), revision, signature_key); | 48 key.GetSecret(), revision, signature_key); |
49 ASSERT_EQ(expected_signature, signature); | 49 ASSERT_EQ(expected_signature, signature); |
50 } | 50 } |
51 | 51 |
52 } // namespace chromeos | 52 } // namespace chromeos |
OLD | NEW |