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

Side by Side Diff: chrome/browser/chromeos/policy/device_policy_cros_browser_test.h

Issue 14268009: Support VariationsRestrictParameter in VariationsService for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO about MockImageBurnerClient 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
(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_BROWSER_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_POLICY_CROS_BROWSER_TEST_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"
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 not needed?
Mathieu 2013/04/22 14:14:23 Done.
12 #include "chrome/browser/metrics/variations/variations_service.h"
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 not needed
Mathieu 2013/04/22 14:14:23 Done.
13 #include "chrome/common/chrome_paths.h"
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 not needed?
Mathieu 2013/04/22 14:14:23 Done.
14 #include "chrome/test/base/testing_browser_process.h"
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 not needed / forward-declare?
Mathieu 2013/04/22 14:14:23 Done.
15 #include "chromeos/dbus/fake_session_manager_client.h"
16 #include "chromeos/dbus/mock_dbus_thread_manager.h"
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 forward-declare?
Mathieu 2013/04/22 14:14:23 Done.
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();
27
28 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 #include "base/compiler_specific.h"
Mathieu 2013/04/22 14:14:23 Done.
29
30 void InstallOwnerKey();
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 Needs docs: What it does and when to call.
Mathieu 2013/04/22 14:14:23 Done.
31
32 void RefreshDevicePolicy();
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 ditto
Mathieu 2013/04/22 14:14:23 Done.
33
34 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE;
35
36 BrowserProcess* browser_process() { return g_browser_process; }
37
38 chromeos::MockDBusThreadManager* mock_dbus_thread_manager() {
39 return mock_dbus_thread_manager_;
40 }
41
42 chromeos::FakeSessionManagerClient* session_manager_client() {
43 return &session_manager_client_;
44 }
45
46 DevicePolicyBuilder* device_policy() { return &device_policy_; }
47
48 private:
49 // Set additional expectations on |mock_dbus_thread_manager_| to suppress
50 // gmock warnings.
51 void SetMockDBusThreadManagerExpectations();
52
53 chromeos::MockDBusThreadManager* mock_dbus_thread_manager_;
54
55 // Mock out policy loads/stores from/to the device.
56 chromeos::FakeSessionManagerClient session_manager_client_;
57
58 // Carries Chrome OS device policies for tests.
59 DevicePolicyBuilder device_policy_;
60
61 // Stores the device owner key.
62 base::ScopedTempDir temp_dir_;
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 #include "base/files/scoped_temp_dir.h"
Mathieu 2013/04/22 14:14:23 Done.
63
64 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCrosBrowserTest);
Mattias Nissler (ping if slow) 2013/04/22 10:07:43 #include "base/basictypes.h"
Mathieu 2013/04/22 14:14:23 Done.
65 };
66
67 } // namespace policy
68
69 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_POLICY_CROS_BROWSER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698