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/policy/proto/chromeos/install_attributes.pb.h" | 12 #include "chrome/browser/chromeos/policy/proto/install_attributes.pb.h" |
13 #include "chromeos/cryptohome/cryptohome_util.h" | 13 #include "chromeos/cryptohome/cryptohome_util.h" |
14 #include "chromeos/dbus/dbus_thread_manager.h" | 14 #include "chromeos/dbus/dbus_thread_manager.h" |
15 #include "chromeos/dbus/fake_cryptohome_client.h" | 15 #include "chromeos/dbus/fake_cryptohome_client.h" |
16 #include "google_apis/gaia/gaia_auth_util.h" | 16 #include "google_apis/gaia/gaia_auth_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace policy { | 19 namespace policy { |
20 | 20 |
21 namespace cryptohome_util = chromeos::cryptohome_util; | 21 namespace cryptohome_util = chromeos::cryptohome_util; |
22 | 22 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 ASSERT_EQ(static_cast<int>(blob.size()), | 249 ASSERT_EQ(static_cast<int>(blob.size()), |
250 file_util::WriteFile(GetTempPath(), blob.c_str(), blob.size())); | 250 file_util::WriteFile(GetTempPath(), blob.c_str(), blob.size())); |
251 install_attributes_.ReadCacheFile(GetTempPath()); | 251 install_attributes_.ReadCacheFile(GetTempPath()); |
252 EXPECT_EQ(DEVICE_MODE_CONSUMER_KIOSK, install_attributes_.GetMode()); | 252 EXPECT_EQ(DEVICE_MODE_CONSUMER_KIOSK, install_attributes_.GetMode()); |
253 EXPECT_EQ("", install_attributes_.GetDomain()); | 253 EXPECT_EQ("", install_attributes_.GetDomain()); |
254 EXPECT_EQ("", install_attributes_.GetRegistrationUser()); | 254 EXPECT_EQ("", install_attributes_.GetRegistrationUser()); |
255 EXPECT_EQ("", install_attributes_.GetDeviceId()); | 255 EXPECT_EQ("", install_attributes_.GetDeviceId()); |
256 } | 256 } |
257 | 257 |
258 } // namespace policy | 258 } // namespace policy |
OLD | NEW |