summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-03-04 09:44:29 +0100
committerFlorian Bruhin <me@the-compiler.org>2022-03-04 09:44:29 +0100
commit44e00c59922e323c96dbc11a9bb05a8e0aec157a (patch)
tree2074a2730518ea7dca718c2f70f3dc079d0fd9fd
parent941627d778f5311477c93ce13603dcbadde2b5d5 (diff)
downloadqutebrowser-44e00c59922e323c96dbc11a9bb05a8e0aec157a.tar.gz
qutebrowser-44e00c59922e323c96dbc11a9bb05a8e0aec157a.zip
Handle missing support in sandbox test
-rw-r--r--tests/end2end/test_invocations.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index c3f5bddbc..9ea7ff8fa 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -830,7 +830,15 @@ def test_json_logging_without_debug(request, quteproc_new, runtime_tmpdir):
@pytest.mark.qtwebkit_skip
@pytest.mark.parametrize('sandboxing, has_namespaces, has_seccomp, has_yama, expected_result', [
- ('enable-all', True, True, True, "You are adequately sandboxed."),
+ pytest.param(
+ 'enable-all',
+ True, True, True,
+ "You are adequately sandboxed.",
+ marks=pytest.mark.skipif(
+ testutils.disable_seccomp_bpf_sandbox(),
+ reason="Full sandboxing not supported",
+ ),
+ ),
('disable-seccomp-bpf', True, False, True, "You are NOT adequately sandboxed."),
('disable-all', False, False, False, "You are NOT adequately sandboxed."),
])
@@ -847,6 +855,12 @@ def test_sandboxing(
quteproc_new.open_url('chrome://sandbox')
text = quteproc_new.get_content()
print(text)
+
+ not_found_msg = ("The webpage at chrome://sandbox/ might be temporarily down or "
+ "it may have moved permanently to a new web address.")
+ if text.split()[-1] == not_found_msg:
+ pytest.skip("chrome://sandbox/ not supported")
+
header, *lines, empty, result = text.split("\n")
assert header == "Sandbox Status"