From 388c155ebbb7e6690923323048a4b46a435947b9 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 3 May 2018 18:02:20 +0200 Subject: [PATCH] Add test for #3753 --- .../unit/browser/webengine/test_webenginesettings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/unit/browser/webengine/test_webenginesettings.py b/tests/unit/browser/webengine/test_webenginesettings.py index e396e168b..d40002a77 100644 --- a/tests/unit/browser/webengine/test_webenginesettings.py +++ b/tests/unit/browser/webengine/test_webenginesettings.py @@ -73,3 +73,14 @@ def test_existing_dict(config_stub, monkeypatch): webenginesettings.private_profile]: assert profile.isSpellCheckEnabled() assert profile.spellCheckLanguages() == ['en-US-8-0'] + + +@pytest.mark.skipif( + not qtutils.version_check('5.8'), reason="Needs Qt 5.8 or newer") +def test_spell_check_disabled(config_stub, monkeypatch): + monkeypatch.setattr(objects, 'backend', usertypes.Backend.QtWebEngine) + config_stub.val.spellcheck.languages = [] + webenginesettings._update_settings('spellcheck.languages') + for profile in [webenginesettings.default_profile, + webenginesettings.private_profile]: + assert not profile.isSpellCheckEnabled()