Commit Graph

15127 Commits

Author SHA1 Message Date
Jimmy
cba93954cd Allow download_stub test fixture to handle file targets. 2018-03-03 13:14:49 +13:00
Jimmy
2307a0850f Greasemonkey: Support greasemonkey-reload --force.
Added a new argument to the greasemonkey-reload command to support
also re-downloading any `@required` scripts.
2018-03-03 13:14:49 +13:00
Jimmy
b91e2e3267 Allow download manager to overwrite existing files unprompted.
This is to support the non-interactive use case of setting a
`FileDownloadTarget` and passing auto_remove and not caring if the target
file exists or not.

An alternative to adding the attribute to `FileDownloadTarget` and
having set_target pull it out would be to add a new param to `fetch()`
and `set_target()`. But it would only be used for one target type
anyway.
2018-03-03 13:14:49 +13:00
Jimmy
a7b74d8e83 Greasemonkey: give required scripts a readable filename. 2018-03-03 13:14:49 +13:00
Jimmy
33d66676c9 Greasemonkey: mock the new GM4 promises based API.
Based on the gm4-polyfill.js script from the greasemonkey devs. But not
the same because that script doesn't work for us for a couple of
reasons:

* It assumes all GM_* functions are attributes of `this` which in
this case is the global window object. Which breaks it out of our iife.
It is possible to change what `this` is within the iife but then we
would have to do something weird to ensure the functions were available
with the leading `this.`. And I don't think user javascripts tend to
call GM functions like that anyway, that polyfill script is just making
weird assumptions and then claiming it'll work for "any user script
engine".

* It tries to provide implementations of GM_registerMenuCommand and
GM_getResource text which do unexpected thins or implement a circular
dependency on the new version, respectively.
2018-03-03 13:14:49 +13:00
Jimmy
a76c0067e1 Greasemonkey: Add support for the @require rule.
The greasemonkey spec states that user scripts should be able to put the URL
of a javascript source as the value of an `@require` key and expect to have
that script available in its scope. This commit supports deferring a user
script from being available until it's required scripts are downloaded,
downloading the scripts and prepending them onto the userscripts code before
placing it all in an iffe.

TODO:
* should I be saving the scripts somewhere else? Maybe the cache dir?
  The are just going to data/greasemonkey/requires/ atm.
2018-03-03 13:14:49 +13:00
Florian Bruhin
02c313eafd Add packages needed with tox 2018-03-02 10:22:59 +01:00
Florian Bruhin
be7a21eb56 Make sure the backend is set in test_webenginesettings.py 2018-03-02 07:00:09 +01:00
Florian Bruhin
b0c25e1bed Add missing )
I shouldn't be allowed to push at 6:30 AM...
2018-03-02 06:58:37 +01:00
Florian Bruhin
9721881261 Adjust @issue3572 check for Qt 5.10.1 2018-03-02 06:37:01 +01:00
Florian Bruhin
5d68dc08d5 Update changelog 2018-03-02 06:35:04 +01:00
Florian Bruhin
067be7aaa2 Simplify mock checks 2018-03-02 06:33:56 +01:00
Florian Bruhin
6fc560fc78 Rewrite comment 2018-03-02 06:31:23 +01:00
Florian Bruhin
fb7fa0cb49 Merge remote-tracking branch 'origin/pr/3652' 2018-03-02 06:31:00 +01:00
Florian Bruhin
52129f2e4d Merge remote-tracking branch 'origin/pr/3659' 2018-03-02 06:30:52 +01:00
Ryan Roden-Corrent
d5e30fd728 Don't crash first completion update with min_chars.
When min_chars is nonzero, if the first command that opens the
completion has < min_chars on the word under the cursor, it triggers a
check for a condition where last_cursor_pos is None.

By setting last_cursor_pos=-1 we ensure that the completer always
updates the first time it is opened, and that there is never a check
against None.

This adds a test for the min_chars feature.

Resolves #3635.
2018-03-01 22:07:53 -05:00
Jay Kamat
a2b5bf0b73
Clear old search results on webkit
Fixes an issue with #3626
2018-03-01 16:15:38 -05:00
Ryan Roden-Corrent
2965f954ba Resolve empty completion.timestamp_format crash.
Resolves #3628.
2018-03-01 07:54:20 -05:00
Florian Bruhin
257011a6d2 Fix installing codecov on Travis 2018-03-01 12:56:43 +01:00
Florian Bruhin
f33d659924 Release v1.1.2 2018-03-01 09:15:54 +01:00
Florian Bruhin
b14a37cf1f Update changelog for v1.1.2
[ci skip]
2018-02-28 16:14:34 +01:00
Florian Bruhin
7fd0b52360 Add missing newline
[ci skip]
2018-02-28 08:11:23 +01:00
Florian Bruhin
8ea6cf352b Remove unneeded version check
The option isn't going to magically change as the config system prevents that.
2018-02-28 08:08:47 +01:00
Florian Bruhin
f3aaa1084a Migrate spell tests to unittests 2018-02-28 08:08:23 +01:00
Florian Bruhin
824825e67d Make sure we only show dictionary warnings once
After 3956f81e73 where this was made a function,
the warning was shown twice, causing AppVeyor to fail.
2018-02-28 08:01:11 +01:00
Florian Bruhin
889b03169a Upgrade to PyQt 5.10.1 2018-02-28 06:28:01 +01:00
Florian Bruhin
e6aa6b8235 Add missing docs for {url:host} 2018-02-27 17:29:36 +01:00
Florian Bruhin
5eb340d481 Add missing tests for completions 2018-02-27 15:55:00 +01:00
Florian Bruhin
60f0175a36 Fix getting customized options
This was broken with per-domain settings
Fixes #3649
2018-02-27 15:39:57 +01:00
Florian Bruhin
b906d92053 Remove now uneeded pylint ignore 2018-02-27 10:06:11 +01:00
Florian Bruhin
93ff9006ad Merge remote-tracking branch 'origin/pr/3643' 2018-02-27 06:24:33 +01:00
Florian Bruhin
bc3e1b316d Use "command -v" instead of "which" in bash scripts
shellcheck recently added SC2330 checking for this. "which" is non-standard, and
not guaranteed by POSIX to have a meaningful exit status, while "command -v" is
specified by POSIX: https://stackoverflow.com/q/592620
2018-02-27 06:23:00 +01:00
Florian Bruhin
53fb5af99c Paste version information privately 2018-02-26 23:09:55 +01:00
pyup-bot
416712d2dc Update pytest from 3.4.0 to 3.4.1 2018-02-26 17:04:18 +01:00
pyup-bot
3dedd0d178 Update hypothesis from 3.45.2 to 3.46.0 2018-02-26 17:04:17 +01:00
Florian Bruhin
cdf6f52d15 Update changelog
[ci skip]
2018-02-26 08:15:34 +01:00
Florian Bruhin
6f9c62b24a Improve marker descriptions 2018-02-26 07:56:51 +01:00
Florian Bruhin
353753c03c Merge remote-tracking branch 'origin/pr/3620' 2018-02-26 07:26:24 +01:00
Florian Bruhin
de0aa32c11 Merge remote-tracking branch 'origin/pr/3626' 2018-02-26 07:20:34 +01:00
Florian Bruhin
edd2f89d5d Update changelog 2018-02-26 07:16:55 +01:00
Florian Bruhin
bd79d7e071 Merge remote-tracking branch 'origin/pr/3637' 2018-02-26 07:16:19 +01:00
Jay Kamat
76bf35cbdd
Add qtbug60673 markers to relevant tests 2018-02-25 19:00:15 -05:00
Jay Kamat
7a8fa5f46e
Implement deduplication of searches on webkit 2018-02-25 18:40:16 -05:00
Anton S
eeb565319f Handle invalid URLs on Apple events 2018-02-25 23:58:49 +03:00
Florian Bruhin
3df066c694 Update changelog 2018-02-25 21:10:35 +01:00
Florian Bruhin
54713f57e5 Merge remote-tracking branch 'origin/pr/3624' 2018-02-25 21:09:56 +01:00
Florian Bruhin
a98466336e Update changelog 2018-02-25 19:58:23 +01:00
Florian Bruhin
52b5492c6a Merge branch 'per-url' 2018-02-25 19:44:51 +01:00
Florian Bruhin
ba88fc43e0 Stabilize error page test 2018-02-25 19:40:38 +01:00
Florian Bruhin
abf4d10d5b Add a test for :set -p with a pattern 2018-02-25 19:33:27 +01:00