Commit Graph

107 Commits

Author SHA1 Message Date
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 222f1f19a1 Bump copyright years
Closes #6015
2021-01-20 20:06:19 +01:00
Florian Bruhin b29a8c50de downloads: Handle data: URLs with explicit filename
This is a follow-up to 9ae08c0f15.

See #1099
Fixes #6041
2021-01-16 11:34:12 +01:00
Florian Bruhin fbe29a2a25 tests: Improve tests for data: URL workaround 2021-01-16 11:25:52 +01:00
Florian Bruhin 9ae08c0f15 Improve download filenames for data: URLs
With QtWebEngine, downloading a data: URL seems to give us the raw data:
URL as filename, similar to #1214 / #1321 but for QtWebEngine.

With QtWebKit, the logic is now also improved so that we get a proper
extension rather than a "binary blob" filename.

See #1099
2021-01-05 11:19:01 +01:00
Florian Bruhin f5353970d3 webenginesettings: Move _init_settings() 2020-12-04 18:41:01 +01:00
Florian Bruhin 77186e49d6 webenginesettings: Don't special-case set_dictionary_language 2020-12-04 18:41:00 +01:00
Florian Bruhin 5a1e4f1972 Fix lint 2020-12-04 18:05:17 +01:00
Florian Bruhin 1933081ad4 tests: Avoid calling webenginesettings.init()
Since #5813, we now do more work there - and there already is quite a
bit of odd patching, so this isn't really the right way forward.

For now, replicate the initialization steps we *actually* need inside
the tests. I'm not entirely happy with this solution, but it's likely we
can revisit this to find something nicer when refactoring profile
initialization in general, see #5935.

This unfortunately also means there's no good way we can do what
`test_default_user_agent_saved` did, so I ended up removing it.
2020-12-04 17:06:50 +01:00
Ted Morse 1f67527662 Only apply blink-settings on Qt 15.5.2
Turns out Qt 5.15.{0,1} also needs `--force-dark-mode`. This commit
fixes it to only use the blink-setting on Qt 5.15.2 and up. It also
parameterizes the tests better to test that the settings work on their
respective Qt versions.
2020-11-29 10:58:27 -08:00
Ted Morse 314c81b24e Use blink-setting for colorscheme on Qt 5.15+
On Qt 5.15+, `--force-dark-mode` does not set the preferred colorscheme.
A blink-setting is used instead to set the preferred colorscheme.

The `--force-dark-mode` flag is only set for Qt 5.14. All later versions
will use the blink-setting flag.
2020-11-28 22:58:32 -08:00
Florian Bruhin 3afdd9b946 Add override for darkmode variant 2020-11-23 14:42:25 +01:00
Florian Bruhin bcb8b5dd70 old qt: Remove unused imports 2020-11-04 18:30:04 +01:00
Florian Bruhin 9f9d4d7b5b old qt: Remove various test workarounds 2020-11-04 18:30:04 +01:00
Florian Bruhin 160831c5bd old qt: Remove conditional and old tests 2020-11-04 18:30:04 +01:00
Florian Bruhin 2929949d67 old qt: Remove conditionals for spell checks 2020-11-04 18:27:26 +01:00
Florian Bruhin 85832c76db old qt: Remove conditionals for cookie handling 2020-11-04 18:27:26 +01:00
Florian Bruhin 05111e8423 old qt: Adjust greasemonkey support 2020-11-04 11:30:54 +01:00
Florian Bruhin f369d0d7d2 old qt: Remove dark mode handling 2020-11-04 11:30:54 +01:00
Florian Bruhin c95b9637e1 old qt: Remove old inspector logic 2020-11-04 11:30:54 +01:00
Florian Bruhin c6d6ea532f old qt: Adjust configdata.yml and settings docs 2020-11-04 11:30:54 +01:00
Florian Bruhin c473a5063f Fix lint 2020-10-19 15:04:14 +02:00
Florian Bruhin 485f67b124 Replace darkmode version by variant 2020-10-19 15:04:14 +02:00
Florian Bruhin 711deea870 Move dark mode to its own file 2020-10-19 15:04:14 +02:00
Florian Bruhin 776f8b1913 Fix lint 2020-05-07 12:01:25 +02:00
Florian Bruhin f41c745ee6 Add more tests for cookie handling 2020-05-07 11:26:49 +02:00
Florian Bruhin dad8efa4b1 Handle invalid URLs in _accept_cookie 2020-05-06 21:01:43 +02:00
Florian Bruhin 62af757845 Merge remote-tracking branch 'origin/pr/4395' into cookies 2020-05-06 19:58:54 +02:00
Florian Bruhin 9e4276db9b Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
Florian Bruhin 4151680e93 Refactor user agent handling
We now use a format string for the user_agent setting and parse both backend's
default user agents to get the needed information.

Fixes #513
2019-12-20 16:53:17 +01:00
Florian Bruhin 18696e69de Fix test_resource_type_values with Qt 5.7 2019-12-20 12:17:38 +01:00
Florian Bruhin 6ecae98d97 Qt 5.14: Add interceptors.ResourceType.Preload(Main|Sub)Frame
This requires the dict to be built dynamically because only newer PyQt versions
define those keys.

See
2019-12-20 11:29:39 +01:00
Florian Bruhin a5fb23458b Clean up filename handling in dictcli/spell.py
Before this change, we sometimes assumed that a dictionary filename had a .bdic
suffix, sometimes not, and sometimes we added it by hand.

For some reason (probably some minor API change?) this currently breaks running
dictcli.py.

While the minimal fix in #4986 works, it only does so because we use re.match
(not re.fullmatch) inside spell.py, so the .bdic suffix (which is present
there) is ignored.

This change instead refactors all dict handling so that the suffix is always
included in the filename, and only stripped off in the last moment when passing
it to QtWebEngine.

Closes #4986
2019-08-27 11:25:00 +02:00
Florian Bruhin d4e5c9aebd Add test for permission workaround 2019-07-06 17:30:09 +02:00
lufte 87a36348ab Merge branch 'master' into issue3636-cookies.accept-webengine 2019-05-24 14:05:06 -03:00
lufte 6d12efe13a Fix DOCKER=archlinux test environment 2019-05-24 01:09:01 -03:00
lufte 12f50dacbd firstPartyUrl must not be empty 2019-05-24 00:54:19 -03:00
lufte b6e892e44d Fix flake8 errors 2019-05-21 20:52:19 -03:00
lufte a9822354ca Merge branch 'issue3636-cookies.accept-webengine' of github.com:lufte/qutebrowser into issue3636-cookies.accept-webengine 2019-05-18 22:30:11 -03:00
lufte 5ef1b8de2d Parametrize tests instead of writing every variation 2019-05-18 22:29:29 -03:00
lufte 390edbb373 Don't mock the request object 2019-05-18 22:16:56 -03:00
lufte 829c8653eb Don't use set_str to set settings 2019-05-18 21:51:06 -03:00
lufte 6f0fad7120 Import modules and sort imports 2019-05-18 21:49:11 -03:00
Javier Ayres 84f3757143
Update copyright
Co-Authored-By: Florian Bruhin <me@the-compiler.org>
2019-05-18 21:35:23 -03:00
lufte 2b9cb1b095 Empty line between comment and imports 2019-05-18 21:34:55 -03:00
lufte e78a0e6a17 Fix incomplete sentence in docstring. 2019-05-16 20:11:35 -03:00
lufte 802ea42d41 Add tests that check the setting without a pattern 2019-05-16 20:04:13 -03:00
lufte 62f6e48665 Fix typo 2019-05-16 19:35:16 -03:00
lufte cb0028e362 Rename so pytest doesn't complain 2019-05-16 19:25:31 -03:00
lufte 50482a0a52 Use firstPartyUrl instead of origin, and test 2019-05-04 16:55:45 -03:00