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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 14192016: Move OS_CHROMEOS-specific paths to chromeos/chromeos_paths.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 | Annotate | Revision Log
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 25 matching lines...) Expand all
36 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" 36 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
37 #include "chrome/browser/chromeos/settings/cros_settings.h" 37 #include "chrome/browser/chromeos/settings/cros_settings.h"
38 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 38 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
39 #include "chrome/browser/policy/browser_policy_connector.h" 39 #include "chrome/browser/policy/browser_policy_connector.h"
40 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 40 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
41 #include "chrome/browser/policy/cloud/cloud_policy_core.h" 41 #include "chrome/browser/policy/cloud/cloud_policy_core.h"
42 #include "chrome/browser/policy/cloud/cloud_policy_store.h" 42 #include "chrome/browser/policy/cloud/cloud_policy_store.h"
43 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h" 43 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h"
44 #include "chrome/browser/policy/cloud/policy_builder.h" 44 #include "chrome/browser/policy/cloud/policy_builder.h"
45 #include "chrome/common/chrome_notification_types.h" 45 #include "chrome/common/chrome_notification_types.h"
46 #include "chrome/common/chrome_paths.h"
47 #include "chrome/common/chrome_switches.h" 46 #include "chrome/common/chrome_switches.h"
48 #include "chrome/test/base/testing_browser_process.h" 47 #include "chrome/test/base/testing_browser_process.h"
49 #include "chrome/test/base/testing_profile.h" 48 #include "chrome/test/base/testing_profile.h"
50 #include "chrome/test/base/ui_test_utils.h" 49 #include "chrome/test/base/ui_test_utils.h"
50 #include "chromeos/chromeos_paths.h"
51 #include "chromeos/chromeos_switches.h" 51 #include "chromeos/chromeos_switches.h"
52 #include "chromeos/dbus/fake_session_manager_client.h" 52 #include "chromeos/dbus/fake_session_manager_client.h"
53 #include "chromeos/dbus/mock_dbus_thread_manager.h" 53 #include "chromeos/dbus/mock_dbus_thread_manager.h"
54 #include "chromeos/dbus/mock_session_manager_client.h" 54 #include "chromeos/dbus/mock_session_manager_client.h"
55 #include "chromeos/dbus/mock_shill_manager_client.h" 55 #include "chromeos/dbus/mock_shill_manager_client.h"
56 #include "chromeos/dbus/mock_update_engine_client.h" 56 #include "chromeos/dbus/mock_update_engine_client.h"
57 #include "content/public/browser/notification_details.h" 57 #include "content/public/browser/notification_details.h"
58 #include "content/public/browser/notification_service.h" 58 #include "content/public/browser/notification_service.h"
59 #include "content/public/test/mock_notification_observer.h" 59 #include "content/public/test/mock_notification_observer.h"
60 #include "crypto/rsa_private_key.h" 60 #include "crypto/rsa_private_key.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 487 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
488 base::FilePath owner_key_file = temp_dir_.path().AppendASCII("owner.key"); 488 base::FilePath owner_key_file = temp_dir_.path().AppendASCII("owner.key");
489 std::vector<uint8> owner_key_bits; 489 std::vector<uint8> owner_key_bits;
490 ASSERT_TRUE(device_policy_.signing_key()->ExportPublicKey(&owner_key_bits)); 490 ASSERT_TRUE(device_policy_.signing_key()->ExportPublicKey(&owner_key_bits));
491 ASSERT_EQ( 491 ASSERT_EQ(
492 file_util::WriteFile( 492 file_util::WriteFile(
493 owner_key_file, 493 owner_key_file,
494 reinterpret_cast<const char*>(vector_as_array(&owner_key_bits)), 494 reinterpret_cast<const char*>(vector_as_array(&owner_key_bits)),
495 owner_key_bits.size()), 495 owner_key_bits.size()),
496 static_cast<int>(owner_key_bits.size())); 496 static_cast<int>(owner_key_bits.size()));
497 ASSERT_TRUE(PathService::Override(chrome::FILE_OWNER_KEY, owner_key_file)); 497 ASSERT_TRUE(
498 PathService::Override(chromeos::FILE_OWNER_KEY, owner_key_file));
498 499
499 // Setup the device policy. 500 // Setup the device policy.
500 em::ChromeDeviceSettingsProto& proto(device_policy_.payload()); 501 em::ChromeDeviceSettingsProto& proto(device_policy_.payload());
501 proto.mutable_device_local_accounts()->add_account()->set_id( 502 proto.mutable_device_local_accounts()->add_account()->set_id(
502 kAutoLoginUsername); 503 kAutoLoginUsername);
503 RefreshDevicePolicy(); 504 RefreshDevicePolicy();
504 505
505 // Setup the device local account policy. 506 // Setup the device local account policy.
506 policy::UserPolicyBuilder device_local_account_policy; 507 policy::UserPolicyBuilder device_local_account_policy;
507 device_local_account_policy.policy_data().set_username(kAutoLoginUsername); 508 device_local_account_policy.policy_data().set_username(kAutoLoginUsername);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 803
803 // Wait for login tasks to complete. 804 // Wait for login tasks to complete.
804 content::RunAllPendingInMessageLoop(); 805 content::RunAllPendingInMessageLoop();
805 806
806 // Timer should still be stopped after login completes. 807 // Timer should still be stopped after login completes.
807 ASSERT_TRUE(auto_login_timer()); 808 ASSERT_TRUE(auto_login_timer());
808 EXPECT_FALSE(auto_login_timer()->IsRunning()); 809 EXPECT_FALSE(auto_login_timer()->IsRunning());
809 } 810 }
810 811
811 } // namespace chromeos 812 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698