Florian Bruhin
29142f763c
Use a proper data dir for PDF.js
2018-10-04 16:54:44 +02:00
Florian Bruhin
4b495303f9
Merge remote-tracking branch 'origin/pr/4191'
2018-09-30 22:01:57 +02:00
zaowen
5b089d0460
Minor requested changes
2018-09-29 02:00:42 -06:00
Florian Bruhin
f3408710ba
Fix webkitelem tests
2018-09-27 23:09:44 +02:00
Florian Bruhin
718376f154
Refactor JS escaping
...
This renames javascript.convert_js_arg() to javascript.to_js() and uses that
instead of string_escape() where possible.
2018-09-27 16:36:28 +02:00
Florian Bruhin
905863f74e
Fix lint
2018-09-27 10:08:50 +02:00
Florian Bruhin
56b8447fb9
Use callback.assert_called_with()
2018-09-27 10:06:50 +02:00
Florian Bruhin
a27a8ada4d
Use qtbot.wait_callback
2018-09-26 11:45:45 +02:00
Florian Bruhin
73cba046e5
Use wait argument with qtbot.assert_not_emitted
2018-09-26 11:27:58 +02:00
Florian Bruhin
a292664ca0
Merge remote-tracking branch 'origin/pr/4218'
2018-09-26 11:20:45 +02:00
Zarthur
b41d7ba203
Merge branch 'master' into master
2018-09-20 11:02:27 -06:00
zaowen
a75587f270
blah
2018-09-20 10:51:33 -06:00
zaowen
5ecfe43ebb
ci dumb
2018-09-20 10:49:37 -06:00
zaowen
c4cca4755e
Add adblock import directory unit test
2018-09-20 10:38:50 -06:00
Ellis
343de2db51
Added case for whitelisted url with * wildcard
2018-09-18 13:33:05 -04:00
Florian Bruhin
e105edebf5
Wait for follow_selected_done
2018-09-15 20:46:11 +02:00
Florian Bruhin
f817e5d271
Fix typo
2018-09-15 20:41:56 +02:00
Florian Bruhin
abff44def6
Get rid of end-of-doc-workaround in caret browsing
...
In Qt < 5.10 (and also sometimes on Windows), we get extra spaces or newlines
when moving to the end of the document. However, this only happens *sometimes*,
and manual testing confirms that with the current workaround, we actually lose
the last char in the selection.
I'm not sure what's happening there, but instead of making things worse with
the workaround, let's just be a bit less strict with the checking there and
accept both variants... This seems like some Chromium bug we can't do much
about.
2018-09-15 20:39:35 +02:00
Florian Bruhin
e47bf7a137
Remove duplicate test
2018-09-15 15:49:48 +02:00
Florian Bruhin
d74daf9294
Fix lint
2018-09-14 22:52:40 +02:00
Florian Bruhin
5ea8e766f5
Run all :follow-selected tests with/without JS
2018-09-14 22:49:18 +02:00
Florian Bruhin
b5af448196
Fix test_follow_selected_without_a_selection on QtWebKit
2018-09-14 22:46:31 +02:00
Florian Bruhin
4ae78d9bb2
Revert "Revert "Make sure we wait until follow_selected is done""
...
This reverts commit 200c11625f
.
2018-09-14 22:40:47 +02:00
Florian Bruhin
200c11625f
Revert "Make sure we wait until follow_selected is done"
...
This reverts commit bc45aa33e0
.
2018-09-14 21:58:42 +02:00
Florian Bruhin
8d066690e6
Fix :follow-selected tests
2018-09-14 21:57:37 +02:00
Florian Bruhin
bc45aa33e0
Make sure we wait until follow_selected is done
2018-09-14 20:18:33 +02:00
Florian Bruhin
68af23b76e
Try getting selection multiple times
2018-09-13 22:41:30 +02:00
Florian Bruhin
62458c7a84
Register a qute://testdata/ scheme for unit tests
...
This is more lightweight than running a webserver (probably about the same as
file://), but allows us to use relative links in files.
2018-09-13 22:32:00 +02:00
Florian Bruhin
d80d9eb26c
Allow downloading from PDF.js
...
When we click the download button in PDF.js, it downloads a blob://qute:...
URL. We can detect that and force a download rather than opening it in PDF.js
again.
Note that what actually happens depends on the Qt version and backend:
QtWebKit (any Qt version):
Downloads always work properly (regardless of Qt version).
QtWebEngine, Qt 5.7.1:
Downloads work.
QtWebEngine, Qt 5.9 - 5.11:
Downloads won't work as we need to tell PDF.js to not use blob: URLs:
https://bugreports.qt.io/browse/QTBUG-70420 - in theory, PDF.js could fall back
to downloading the existing qute:// URL, but it has a whitelist of schemes
which does not include qute://... Since it's not in that whitelist, it just
ends up doing nothing at all.
QtWebEngine, Qt 5.12:
Downloads should hopefully work properly again, as we can register the qute://
scheme with Chromium, which allows us to use blob:// URLs.
2018-09-10 13:15:39 +02:00
Florian Bruhin
02641b86fc
Don't tell PDF.js to disable createObjectURL on Qt 5.7.1
...
Looks like things actually work fine there...
2018-09-10 13:01:01 +02:00
Florian Bruhin
bb96f8d297
Fix PDF.js test when no PDF.js is installed
2018-09-10 09:36:29 +02:00
Florian Bruhin
9b04c4b8e0
Add missing tests for qute://pdfjs
2018-09-09 19:22:39 +02:00
Florian Bruhin
b4077a8543
Fix lint
2018-09-09 18:39:22 +02:00
Florian Bruhin
b96898db37
Simplify and lock down PDF.js filename handling
2018-09-09 18:35:09 +02:00
Florian Bruhin
8cfa46f539
100% test coverage for browser.pdfjs
2018-09-09 18:35:09 +02:00
Florian Bruhin
3e25262437
Remove old backend patching
2018-09-09 18:35:09 +02:00
Florian Bruhin
24148c649e
Fix lint and tests
2018-09-09 18:35:09 +02:00
Florian Bruhin
3ad7ae2a2c
Remove fix_urls which isn't needed anymore
...
With qute://pdfjs/web/viewer.html we can use relative URLs
2018-09-09 18:35:09 +02:00
Florian Bruhin
bbcb87e434
Get PDF.js to work
...
We need to use the /web/viewer.html path so relative references are correct.
2018-09-09 18:35:09 +02:00
Florian Bruhin
7206dde19c
Revert "Simplify getting pdfjs main page"
...
This reverts commit 9c731bde85627308fdde4730b0181a014096cb47.
We need to set some PDF.js options, so we can't just use the default viewer
with ?file=...
2018-09-09 18:35:09 +02:00
Florian Bruhin
8f19820a7a
Remove pdfjs.fix_urls
...
Now that we use qute://pdfjs to show the viewer, we don't need to rewrite any
URLs.
2018-09-09 18:35:09 +02:00
Florian Bruhin
24fb3b0d1b
Simplify getting pdfjs main page
2018-09-09 18:35:09 +02:00
Florian Bruhin
dc82ac3eb2
Move qute_pdfjs to qutescheme.py
2018-09-09 18:35:09 +02:00
Florian Bruhin
20da259de6
Rewrite some :follow-selected tests as unit tests
2018-09-08 16:01:38 +02:00
Florian Bruhin
9c67239847
Fix lint
2018-09-08 14:52:47 +02:00
Florian Bruhin
db6935b42e
Fix TestSearch caret tests
...
For some reason, they need the window to be shown on a screen to work...
2018-09-08 12:26:00 +02:00
Florian Bruhin
64e321d47c
Rewrite most caret tests as unit tests
2018-09-08 12:15:32 +02:00
Florian Bruhin
4ca8fc0cb7
Use a shared web_history fixture
2018-09-06 20:08:32 +02:00
Florian Bruhin
ab6c8dde9a
Decrease minimum QProgressDialog duration
...
We already have a threshold before we use a QProgressDialog at all, so let's
show it quite quickly and not after 4 seconds.
2018-09-06 17:26:28 +02:00
Florian Bruhin
935d93d10e
Add tests for HistoryProgress
2018-09-06 17:26:28 +02:00