Index: components/ownership/owner_key_util_chromeos_unittest.cc |
diff --git a/chrome/browser/chromeos/settings/owner_key_util_unittest.cc b/components/ownership/owner_key_util_chromeos_unittest.cc |
similarity index 89% |
rename from chrome/browser/chromeos/settings/owner_key_util_unittest.cc |
rename to components/ownership/owner_key_util_chromeos_unittest.cc |
index c5ec00cd85a4be785b4ae6deae842a1c115554a3..a21909d4d9f8a2434e1e13223f74a6e0decbb71e 100644 |
--- a/chrome/browser/chromeos/settings/owner_key_util_unittest.cc |
+++ b/components/ownership/owner_key_util_chromeos_unittest.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/chromeos/settings/owner_key_util.h" |
+#include "components/ownership/owner_key_util_chromeos.h" |
#include <string> |
#include <vector> |
@@ -16,7 +16,7 @@ |
#include "crypto/rsa_private_key.h" |
wtc
2014/08/25 19:41:51
This file doesn't contain "crypto::", so I believe
ygorshenin1
2014/08/26 14:53:35
Done.
|
#include "testing/gtest/include/gtest/gtest.h" |
-namespace chromeos { |
+namespace ownership { |
// 2048-bit RSA public key for testing. |
const uint8 kTestKeyData[] = { |
@@ -47,15 +47,15 @@ const uint8 kTestKeyData[] = { |
0x41, 0x02, 0x03, 0x01, 0x00, 0x01, |
}; |
-class OwnerKeyUtilTest : public testing::Test { |
+class OwnerKeyUtilChromeOSTest : public testing::Test { |
protected: |
- OwnerKeyUtilTest() {} |
- virtual ~OwnerKeyUtilTest() {} |
+ OwnerKeyUtilChromeOSTest() {} |
+ virtual ~OwnerKeyUtilChromeOSTest() {} |
virtual void SetUp() OVERRIDE { |
ASSERT_TRUE(tmpdir_.CreateUniqueTempDir()); |
key_file_ = tmpdir_.path().Append("key"); |
- util_ = new OwnerKeyUtilImpl(key_file_); |
+ util_ = new OwnerKeyUtilChromeOS(key_file_); |
} |
base::ScopedTempDir tmpdir_; |
@@ -63,10 +63,10 @@ class OwnerKeyUtilTest : public testing::Test { |
scoped_refptr<OwnerKeyUtil> util_; |
private: |
- DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilTest); |
+ DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilChromeOSTest); |
}; |
-TEST_F(OwnerKeyUtilTest, ImportPublicKey) { |
+TEST_F(OwnerKeyUtilChromeOSTest, ImportPublicKey) { |
// Export public key, so that we can compare it to the one we get off disk. |
std::vector<uint8> public_key(kTestKeyData, |
kTestKeyData + sizeof(kTestKeyData)); |
@@ -83,7 +83,7 @@ TEST_F(OwnerKeyUtilTest, ImportPublicKey) { |
EXPECT_EQ(public_key, from_disk); |
} |
-TEST_F(OwnerKeyUtilTest, ImportPublicKeyFailed) { |
+TEST_F(OwnerKeyUtilChromeOSTest, ImportPublicKeyFailed) { |
// First test the case where the file is missing which should fail. |
EXPECT_FALSE(util_->IsPublicKeyPresent()); |
std::vector<uint8> from_disk; |
@@ -97,4 +97,4 @@ TEST_F(OwnerKeyUtilTest, ImportPublicKeyFailed) { |
EXPECT_FALSE(from_disk.size()); |
} |
-} // namespace chromeos |
+} // namespace ownership |