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

Side by Side Diff: chrome/browser/policy/device_management_service_browsertest.cc

Issue 6840014: Support decoding GenericNamedValue based policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test broken by patch set 2 Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/policy/device_management_backend_mock.h" 6 #include "chrome/browser/policy/device_management_backend_mock.h"
7 #include "chrome/browser/policy/device_management_service.h" 7 #include "chrome/browser/policy/device_management_service.h"
8 #include "chrome/browser/policy/proto/device_management_constants.h" 8 #include "chrome/browser/policy/proto/device_management_constants.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 MessageLoop::current()->Run(); 158 MessageLoop::current()->Run();
159 } 159 }
160 160
161 { 161 {
162 em::DevicePolicyResponse expected_response; 162 em::DevicePolicyResponse expected_response;
163 163
164 DevicePolicyResponseDelegateMock delegate; 164 DevicePolicyResponseDelegateMock delegate;
165 EXPECT_CALL(delegate, HandlePolicyResponse(_)) 165 EXPECT_CALL(delegate, HandlePolicyResponse(_))
166 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); 166 .WillOnce(InvokeWithoutArgs(QuitMessageLoop));
167 em::DevicePolicyRequest request; 167 em::DevicePolicyRequest request;
168 request.set_policy_scope(kChromePolicyScope); 168 em::PolicyFetchRequest* fetch_request = request.add_request();
169 em::DevicePolicySettingRequest* setting_request = 169 fetch_request->set_signature_type(em::PolicyFetchRequest::SHA1_RSA);
170 request.add_setting_request(); 170 fetch_request->set_policy_type(kChromeUserPolicyType);
171 setting_request->set_key(kChromeDevicePolicySettingKey);
172 backend->ProcessPolicyRequest(token_, "testid", request, &delegate); 171 backend->ProcessPolicyRequest(token_, "testid", request, &delegate);
173 172
174 MessageLoop::current()->Run(); 173 MessageLoop::current()->Run();
175 } 174 }
176 175
177 { 176 {
178 DeviceUnregisterResponseDelegateMock delegate; 177 DeviceUnregisterResponseDelegateMock delegate;
179 EXPECT_CALL(delegate, HandleUnregisterResponse(_)) 178 EXPECT_CALL(delegate, HandleUnregisterResponse(_))
180 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); 179 .WillOnce(InvokeWithoutArgs(QuitMessageLoop));
181 em::DeviceUnregisterRequest request; 180 em::DeviceUnregisterRequest request;
182 backend->ProcessUnregisterRequest(token_, "testid", request, &delegate); 181 backend->ProcessUnregisterRequest(token_, "testid", request, &delegate);
183 182
184 MessageLoop::current()->Run(); 183 MessageLoop::current()->Run();
185 } 184 }
186 } 185 }
187 186
188 } // namespace policy 187 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider.h ('k') | chrome/browser/policy/device_management_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698