init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
48
Telegram/ThirdParty/xdg-desktop-portal/tests/templates/lockdown.py
vendored
Normal file
48
Telegram/ThirdParty/xdg-desktop-portal/tests/templates/lockdown.py
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is formatted with Python Black
|
||||
# mypy: disable-error-code="misc"
|
||||
|
||||
from tests.templates import init_logger
|
||||
|
||||
import dbus.service
|
||||
|
||||
|
||||
BUS_NAME = "org.freedesktop.impl.portal.Test"
|
||||
MAIN_OBJ = "/org/freedesktop/portal/desktop"
|
||||
SYSTEM_BUS = False
|
||||
MAIN_IFACE = "org.freedesktop.impl.portal.Lockdown"
|
||||
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
|
||||
def load(mock, parameters={}):
|
||||
logger.debug(f"Loading parameters: {parameters}")
|
||||
|
||||
mock.AddProperties(
|
||||
MAIN_IFACE,
|
||||
dbus.Dictionary(
|
||||
{
|
||||
"disable-printing": dbus.Boolean(
|
||||
parameters.get("disable-printing", False)
|
||||
),
|
||||
"disable-save-to-disk": dbus.Boolean(
|
||||
parameters.get("disable-save-to-disk", False)
|
||||
),
|
||||
"disable-application-handlers": dbus.Boolean(
|
||||
parameters.get("disable-application-handlers", False)
|
||||
),
|
||||
"disable-location": dbus.Boolean(
|
||||
parameters.get("disable-location", False)
|
||||
),
|
||||
"disable-camera": dbus.Boolean(parameters.get("disable-camera", False)),
|
||||
"disable-microphone": dbus.Boolean(
|
||||
parameters.get("disable-microphone", False)
|
||||
),
|
||||
"disable-sound-output": dbus.Boolean(
|
||||
parameters.get("disable-sound-output", False)
|
||||
),
|
||||
}
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user