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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc

Issue 22986010: Add policy for fullscreen mode; disallow fullscreen in public sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test compilation after rebase. Created 7 years, 4 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 "chrome/browser/chromeos/policy/device_local_account_policy_service.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 expected_policy_map_.Set(key::kShelfAutoHideBehavior, 68 expected_policy_map_.Set(key::kShelfAutoHideBehavior,
69 POLICY_LEVEL_MANDATORY, 69 POLICY_LEVEL_MANDATORY,
70 POLICY_SCOPE_USER, 70 POLICY_SCOPE_USER,
71 Value::CreateStringValue("Never"), 71 Value::CreateStringValue("Never"),
72 NULL); 72 NULL);
73 expected_policy_map_.Set(key::kShowLogoutButtonInTray, 73 expected_policy_map_.Set(key::kShowLogoutButtonInTray,
74 POLICY_LEVEL_MANDATORY, 74 POLICY_LEVEL_MANDATORY,
75 POLICY_SCOPE_USER, 75 POLICY_SCOPE_USER,
76 Value::CreateBooleanValue(true), 76 Value::CreateBooleanValue(true),
77 NULL); 77 NULL);
78 expected_policy_map_.Set(key::kFullscreenAllowed,
79 POLICY_LEVEL_MANDATORY,
80 POLICY_SCOPE_USER,
81 Value::CreateBooleanValue(false),
82 NULL);
78 scoped_ptr<base::ListValue> allowed_extension_types(new base::ListValue()); 83 scoped_ptr<base::ListValue> allowed_extension_types(new base::ListValue());
79 allowed_extension_types->AppendString("hosted_app"); 84 allowed_extension_types->AppendString("hosted_app");
80 expected_policy_map_.Set(key::kExtensionAllowedTypes, 85 expected_policy_map_.Set(key::kExtensionAllowedTypes,
81 POLICY_LEVEL_MANDATORY, 86 POLICY_LEVEL_MANDATORY,
82 POLICY_SCOPE_USER, 87 POLICY_SCOPE_USER,
83 allowed_extension_types.release(), 88 allowed_extension_types.release(),
84 NULL); 89 NULL);
85 90
86 // Explicitly set value. 91 // Explicitly set value.
87 expected_policy_map_.Set(key::kDisableSpdy, 92 expected_policy_map_.Set(key::kDisableSpdy,
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 ASSERT_TRUE(request_job); 575 ASSERT_TRUE(request_job);
571 em::DeviceManagementResponse response; 576 em::DeviceManagementResponse response;
572 response.mutable_policy_response()->add_response()->CopyFrom( 577 response.mutable_policy_response()->add_response()->CopyFrom(
573 device_local_account_policy_.policy()); 578 device_local_account_policy_.policy());
574 request_job->SendResponse(DM_STATUS_SUCCESS, response); 579 request_job->SendResponse(DM_STATUS_SUCCESS, response);
575 FlushDeviceSettings(); 580 FlushDeviceSettings();
576 Mock::VerifyAndClearExpectations(&provider_observer_); 581 Mock::VerifyAndClearExpectations(&provider_observer_);
577 } 582 }
578 583
579 } // namespace policy 584 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698