| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/policy/enterprise_install_attributes.h" | 5 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "chrome/browser/chromeos/policy/proto/install_attributes.pb.h" | 12 #include "chrome/browser/policy/proto/chromeos/install_attributes.pb.h" |
| 13 #include "chromeos/cryptohome/cryptohome_library.h" | 13 #include "chromeos/cryptohome/cryptohome_library.h" |
| 14 #include "chromeos/dbus/cryptohome_client.h" | 14 #include "chromeos/dbus/cryptohome_client.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace policy { | 17 namespace policy { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 void CopyLockResult(base::RunLoop* loop, | 21 void CopyLockResult(base::RunLoop* loop, |
| 22 EnterpriseInstallAttributes::LockResult* out, | 22 EnterpriseInstallAttributes::LockResult* out, |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 ASSERT_EQ(static_cast<int>(blob.size()), | 201 ASSERT_EQ(static_cast<int>(blob.size()), |
| 202 file_util::WriteFile(GetTempPath(), blob.c_str(), blob.size())); | 202 file_util::WriteFile(GetTempPath(), blob.c_str(), blob.size())); |
| 203 install_attributes_.ReadCacheFile(GetTempPath()); | 203 install_attributes_.ReadCacheFile(GetTempPath()); |
| 204 EXPECT_EQ(DEVICE_MODE_ENTERPRISE, install_attributes_.GetMode()); | 204 EXPECT_EQ(DEVICE_MODE_ENTERPRISE, install_attributes_.GetMode()); |
| 205 EXPECT_EQ(kTestDomain, install_attributes_.GetDomain()); | 205 EXPECT_EQ(kTestDomain, install_attributes_.GetDomain()); |
| 206 EXPECT_EQ(kTestUser, install_attributes_.GetRegistrationUser()); | 206 EXPECT_EQ(kTestUser, install_attributes_.GetRegistrationUser()); |
| 207 EXPECT_EQ("", install_attributes_.GetDeviceId()); | 207 EXPECT_EQ("", install_attributes_.GetDeviceId()); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace policy | 210 } // namespace policy |
| OLD | NEW |