mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1452740 - Added Policy: Disable Hardware Acceleration r=Felipe
MozReview-Commit-ID: FVrpCRtwQLh --HG-- extra : rebase_source : ae6ec66f11537b46b0631b195f148ffea580971f
This commit is contained in:
parent
4e3daa47c1
commit
776c97f433
@ -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",
|
||||
|
@ -0,0 +1,7 @@
|
||||
[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]
|
@ -0,0 +1,11 @@
|
||||
/* 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");
|
||||
});
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"policies": {
|
||||
"HardwareAcceleration": false
|
||||
}
|
||||
}
|
@ -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 += [
|
||||
|
Loading…
Reference in New Issue
Block a user