Commit 776c97f4 authored by kanika's avatar kanika
Browse files

Bug 1452740 - Added Policy: Disable Hardware Acceleration r=Felipe

MozReview-Commit-ID: FVrpCRtwQLh

--HG--
extra : rebase_source : ae6ec66f11537b46b0631b195f148ffea580971f
parent 4e3daa47
......@@ -495,6 +495,14 @@ var Policies = {
}
},
"HardwareAcceleration": {
onBeforeAddons(manager, param) {
if (!param) {
setAndLockPref("layers.acceleration.disabled", true);
}
}
},
"Homepage": {
onBeforeUIStartup(manager, param) {
// |homepages| will be a string containing a pipe-separated ('|') list of
......
......@@ -382,6 +382,13 @@
}
},
"HardwareAcceleration": {
"description": "If false, prevents ability to turn on hardware acceleration.",
"first_available": "60.0",
"type": "boolean"
},
"Homepage": {
"description": "Set and optionally lock the homepage.",
"first_available": "60.0",
......
[DEFAULT]
prefs =
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/hardware_acceleration/disable_hardware_acceleration.json'
support-files =
disable_hardware_acceleration.json
[browser_policy_hardware_acceleration.js]
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_policy_hardware_acceleration() {
let winUtils = Services.wm.getMostRecentWindow("").
QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIDOMWindowUtils);
is(winUtils.layerManagerType, "Basic", "Hardware acceleration disabled");
});
......@@ -11,6 +11,7 @@ BROWSER_CHROME_MANIFESTS += [
'browser/disable_developer_tools/browser.ini',
'browser/disable_forget_button/browser.ini',
'browser/disable_fxscreenshots/browser.ini',
'browser/hardware_acceleration/browser.ini',
]
TESTING_JS_MODULES += [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment