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

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

Issue 1217333002: Add a group policy for hardware acceleration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 3819 matching lines...) Expand 10 before | Expand all | Expand 10 after
3830 3830
3831 PrefService* prefs = browser()->profile()->GetPrefs(); 3831 PrefService* prefs = browser()->profile()->GetPrefs();
3832 EXPECT_TRUE(extensions::MessageService::IsNativeMessagingHostAllowed( 3832 EXPECT_TRUE(extensions::MessageService::IsNativeMessagingHostAllowed(
3833 prefs, "host.name")); 3833 prefs, "host.name"));
3834 EXPECT_FALSE(extensions::MessageService::IsNativeMessagingHostAllowed( 3834 EXPECT_FALSE(extensions::MessageService::IsNativeMessagingHostAllowed(
3835 prefs, "other.host.name")); 3835 prefs, "other.host.name"));
3836 } 3836 }
3837 3837
3838 #endif // !defined(CHROME_OS) 3838 #endif // !defined(CHROME_OS)
3839 3839
3840
3841 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
Andrew T Wilson (Slow) 2015/07/03 15:45:28 Why is this not available on Android and ChromeOS?
3842 // Sets the hardware acceleration mode policy before the browser is started.
3843 class HardwareAccelerationModePolicyTest : public PolicyTest {
3844 public:
3845 HardwareAccelerationModePolicyTest() {}
3846
3847 void SetUpInProcessBrowserTestFixture() override {
3848 PolicyTest::SetUpInProcessBrowserTestFixture();
3849 PolicyMap policies;
3850 policies.Set(key::kHardwareAccelerationModeEnabled,
3851 POLICY_LEVEL_MANDATORY,
3852 POLICY_SCOPE_USER,
3853 new base::FundamentalValue(false),
3854 NULL);
3855 provider_.UpdateChromePolicy(policies);
3856 }
3857 };
3858
3859 IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest,
3860 HardwareAccelerationDisabled) {
3861 // Verifies that hardware acceleration can be disabled with policy.
3862 EXPECT_FALSE(
3863 content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr));
3864 }
3865 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
3866
3840 } // namespace policy 3867 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698