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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index a4b6255b1ef72610ff12afe4b15d228016dbd7cd..20f922e1d50a49d1fa4d265635553902be19402c 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -3837,4 +3837,31 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingWhitelist) {
#endif // !defined(CHROME_OS)
+
+#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?
+// Sets the hardware acceleration mode policy before the browser is started.
+class HardwareAccelerationModePolicyTest : public PolicyTest {
+ public:
+ HardwareAccelerationModePolicyTest() {}
+
+ void SetUpInProcessBrowserTestFixture() override {
+ PolicyTest::SetUpInProcessBrowserTestFixture();
+ PolicyMap policies;
+ policies.Set(key::kHardwareAccelerationModeEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
+ provider_.UpdateChromePolicy(policies);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest,
+ HardwareAccelerationDisabled) {
+ // Verifies that hardware acceleration can be disabled with policy.
+ EXPECT_FALSE(
+ content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr));
+}
+#endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698