OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_POLICY_CROS_BROWSERTEST_H_ | |
Alexei Svitkine (slow)
2013/04/19 18:11:55
Rename this to device_policy_cros_browser_test.h/c
Mathieu
2013/04/19 18:37:31
Done.
| |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_POLICY_CROS_BROWSERTEST_H_ | |
7 | |
8 #include "base/files/scoped_temp_dir.h" | |
9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | |
10 #include "chrome/browser/chromeos/policy/device_policy_builder.h" | |
11 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | |
12 #include "chrome/browser/metrics/variations/variations_service.h" | |
13 #include "chrome/common/chrome_paths.h" | |
14 #include "chrome/test/base/testing_browser_process.h" | |
15 #include "chromeos/dbus/fake_session_manager_client.h" | |
16 #include "chromeos/dbus/mock_dbus_thread_manager.h" | |
17 #include "testing/gtest/include/gtest/gtest.h" | |
18 | |
19 namespace policy { | |
20 | |
21 // Used to test Device policy changes in Chrome OS. | |
22 class DevicePolicyCrosBrowserTest : | |
23 public chromeos::CrosInProcessBrowserTest { | |
24 protected: | |
25 DevicePolicyCrosBrowserTest(); | |
26 virtual ~DevicePolicyCrosBrowserTest() {} | |
Alexei Svitkine (slow)
2013/04/19 18:11:55
Move the implementation to the .cc file.
Mathieu
2013/04/19 18:37:31
Done.
| |
27 | |
28 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | |
29 | |
30 virtual void SetMockDBusThreadManagerExpectations(); | |
31 | |
32 virtual void SetUpSessionManager(); | |
33 | |
34 virtual void SetUpAdditionalCrosMocks() {} | |
35 | |
36 virtual void SetSpecificDevicePolicies() {} | |
37 | |
38 virtual void SetDeviceLocalAccountPolicy() {} | |
39 | |
40 void RefreshDevicePolicy(); | |
41 | |
42 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; | |
43 | |
44 BrowserProcess* browser_process() { return g_browser_process; } | |
45 | |
46 chromeos::MockDBusThreadManager* mock_dbus_thread_manager() { | |
47 return mock_dbus_thread_manager_; | |
48 } | |
49 | |
50 chromeos::FakeSessionManagerClient* session_manager_client() { | |
51 return &session_manager_client_; | |
52 } | |
53 | |
54 DevicePolicyBuilder* device_policy() { return &device_policy_; } | |
55 | |
56 private: | |
57 // Install the owner key. | |
58 void InstallOwnerKey(); | |
59 | |
60 chromeos::MockDBusThreadManager* mock_dbus_thread_manager_; | |
61 | |
62 // Mock out policy loads/stores from/to the device. | |
63 chromeos::FakeSessionManagerClient session_manager_client_; | |
64 | |
65 // Carries Chrome OS device policies for tests. | |
66 DevicePolicyBuilder device_policy_; | |
67 | |
68 // Stores the device owner key. | |
69 base::ScopedTempDir temp_dir_; | |
70 | |
71 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCrosBrowserTest); | |
72 }; | |
73 | |
74 } // namespace policy | |
75 | |
76 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_POLICY_CROS_BROWSERTEST_H_ | |
OLD | NEW |