Commit Graph

6877 Commits

Author SHA1 Message Date
Daniel Schadt
e6548dd9e7 reorder pdfjs generation code 2015-12-20 19:24:41 +01:00
Daniel Schadt
3dfaab6194 pdfjs: actually wait until the file is loaded
Otherwise we get incomplete replies and thus no pdf to view.
2015-12-20 19:24:41 +01:00
Daniel Schadt
8b141037ef Add setting value to enable/disable pdf.js 2015-12-20 19:24:41 +01:00
Daniel Schadt
1882fb6006 Add pdf.js in frozen distribution 2015-12-20 19:24:41 +01:00
Daniel Schadt
2887250641 Add pdfjs to the distribution 2015-12-20 19:24:41 +01:00
Daniel Schadt
a4f808f56b Add pdf.js license to readme 2015-12-20 19:24:41 +01:00
Daniel Schadt
fcfc09f541 Revoke "LocalContentCanAccess*Urls"
Since we embed the content of the PDF directly, we no longer need the
permissions for pdf.js.
2015-12-20 19:24:41 +01:00
Daniel Schadt
ea4d9e884e pdfjs: Remove debug output file 2015-12-20 19:24:41 +01:00
Daniel Schadt
5e0090d5b8 pdfjs: Use abosolute URLs
That allows us to use the "original" page URL when displaying with
pdf.js, which means yanking the URL etc works as intended.
2015-12-20 19:24:41 +01:00
Daniel Schadt
0ee13392e1 Basic pdfjs support
Working, but not very well.

Todo:
- remove pdf_file.html debug file
- set URL correctly
2015-12-20 19:24:41 +01:00
Florian Bruhin
fc3a3ea8c6 Add missing not_frozen mark in test_guiprocess.
This should fix test failures when frozen.
2015-12-20 18:40:57 +01:00
Florian Bruhin
fcf94fd527 Remove various deprecated commands/arguments. 2015-12-20 18:38:29 +01:00
Florian Bruhin
ffc76b2a5c Fix spelling. 2015-12-20 17:39:36 +01:00
Florian Bruhin
84ed602b8d tox: Update Werkzeug to 0.11.3.
- Fixed an issue with copy operations not working against
  proxies.
- Changed the logging operations of the development server to
  correctly log where the server is running in all situations
  again.
- Fixed another regression with SSL wrapping similar to the
  fix in 0.11.2 but for a different code path.
2015-12-20 17:26:19 +01:00
Florian Bruhin
3687011e09 tox: Update CherryPy to 5.0.0.
-----
5.0.0
-----

* Removed deprecated support for ``ssl_certificate`` and
  ``ssl_private_key`` attributes and implicit construction
  of SSL adapter on Python 2 WSGI servers.
* Default SSL Adapter on Python 2 is the builtin SSL adapter,
  matching Python 3 behavior.

-----
4.0.0
-----

* Drop support for Python 2.5 and earlier.
* No longer build Windows installers by default.
2015-12-20 17:25:08 +01:00
Florian Bruhin
6b89eb43a2 Allow any non-space char in search engine names.
Closes #1189.
2015-12-20 17:22:54 +01:00
Florian Bruhin
5c769d8000 Report stdout/stderr of failed subprocesses. 2015-12-18 21:23:33 +01:00
Florian Bruhin
d3dc90cb2a Revert "tests: Use urllib to load redirect-later-continue."
This reverts commit 1e43b882ae.
Seems like this causes other trouble (the redirect-later request missing?!)
2015-12-18 20:24:03 +01:00
Florian Bruhin
f787f004af Fix _BaseUserscriptRunner when env is None. 2015-12-18 20:23:39 +01:00
Florian Bruhin
1e43b882ae tests: Use urllib to load redirect-later-continue.
This might avoid the EPROTOTYPE bug on OS X. See #1183.
2015-12-18 19:57:15 +01:00
Florian Bruhin
b3e4ac8043 tests: Fix AttributeError in _wait_for_clipboard. 2015-12-18 07:18:27 +01:00
Florian Bruhin
45d6dc6aa3 tests: Hopefully fix keyinput.feature flakiness.
While the original "no focused webview" bug (with the first test after spawning
qutebrowser) from #1183 was fixed, we still had a case where the next test
after ":fake-key sending key to the website with other window focused" failed,
presumably because the inspector was still focused, e.g. here:

http://qutebrowser.org:8010/builders/osx/builds/1175/steps/tests/logs/stdio

This hopefully fixes this by properly waiting until the inspector is gone.
2015-12-18 07:13:16 +01:00
Florian Bruhin
eed4a992ab tox: Update cherrypy to 3.8.2.
* Correct InternalServerError when null bytes in static file path. Now responds
  with 404 instead.
2015-12-18 05:19:33 +01:00
Florian Bruhin
172157ed0d Remove unused import, take two. 2015-12-17 23:09:11 +01:00
Florian Bruhin
a7dee6c053 Remove unused import. 2015-12-17 22:57:16 +01:00
Florian Bruhin
fc84e58043 tests: Ignore "SelectionRequest too old" globally.
If we use pytestmark, it won't be ignored inside subprocess output, so our fix
from https://github.com/The-Compiler/qutebrowser/issues/1124#issuecomment-158073581
never actually worked.

See #1124 and #1183.
2015-12-17 22:33:07 +01:00
Florian Bruhin
8786e979a6 tests: Wait for data in the clipboard.
This should hopefully stabilize the flaky clipboard tests.
See #1183.
2015-12-17 22:17:38 +01:00
Florian Bruhin
f19de5b908 tox: Update hypothesis to 1.17.1.
A small bug fix release, which fixes the fact that the 'note' function could
not be used on tests which used the @example decorator to provide explicit
examples.
2015-12-17 08:01:47 +01:00
Florian Bruhin
e78d2a8399 tests: Check args for loadFinished signals. 2015-12-17 07:49:28 +01:00
Florian Bruhin
c1951a8f15 tests: Get rid of QSignalSpy where we can. 2015-12-17 07:49:28 +01:00
Florian Bruhin
e9a0dffe3b tox: Update pytest-qt to 1.10.0.
- SignalBlocker now has a args attribute with the arguments of the signal that
  triggered it, or None on a time out.
- MultiSignalBlocker is now properly disconnects from signals upon exit.
2015-12-17 06:59:13 +01:00
Florian Bruhin
a1f4914271 tox: Update pytest-faulthandler to 1.3.0.
Now stops timeout when handling exceptions interactively.
2015-12-16 23:09:02 +01:00
Florian Bruhin
982e78249a tests: Clear captured output between tests. 2015-12-16 23:07:42 +01:00
Florian Bruhin
a157f822d6 tests: Handle report.longrepr being a tuple.
For some unknown reason, report.longrepr.addsection might not exist, which
caused failures on OS X and Windows. If that happens, we just don't add a
section at all.
2015-12-16 22:47:33 +01:00
Florian Bruhin
e6284ed5d4 tests: Improve some ugly test IDs. 2015-12-16 22:21:29 +01:00
Florian Bruhin
bba6589e19 Capture qutebrowser/httpbin output separately.
When using print and relying on pytest to capture it as stdout, we ran into
this pytest/pytest-qt issue:

https://github.com/pytest-dev/pytest-qt/issues/113

Now we use our own capturing mechanism instead, which also means we get nicer
output.

Fixes #1122.
2015-12-16 21:25:13 +01:00
Florian Bruhin
7f83c6c5c8 pylint: Disable no-member for hypothesis.Settings.
hypothesis.Settings.default is probably created dynamically.
2015-12-15 18:57:14 +01:00
Florian Bruhin
4a58e10e09 Enable hypothesis' strict mode. 2015-12-15 18:09:52 +01:00
Florian Bruhin
a387e9669c tox: Update requests to 2.9.0.
Minor Improvements (Backwards compatible)

- The verify keyword argument now supports being passed a path to a directory
  of CA certificates, not just a single-file bundle.
- Warnings are now emitted when sending files opened in text mode.
- Added the 511 Network Authentication Required status code to the status code
  registry.

Bugfixes

- For file-like objects that are not seeked to the very beginning, we now send
  the content length for the number of bytes we will actually read, rather than
  the total size of the file, allowing partial file uploads.
- When uploading file-like objects, if they are empty or have no obvious
  content length we set Transfer-Encoding: chunked rather than
  Content-Length: 0.
- We correctly receive the response in buffered mode when uploading chunked
  bodies.
- We now handle being passed a query string as a bytestring on Python 3, by
  decoding it as UTF-8.
- Sessions are now closed in all cases (exceptional and not) when using the
  functional API rather than leaking and waiting for the garbage collector to
  clean them up.
- Correctly handle digest auth headers with a malformed qop directive that
  contains no token, by treating it the same as if no qop directive was
  provided at all.
- Minor performance improvements when removing specific cookies by name.
2015-12-15 17:58:51 +01:00
Florian Bruhin
7b5f51b145 tests: Ignore empty $XDG_RUNTIME_DIR error.
For some reason it's unset for the buildbot on Ubuntu Trusty, and it shouldn't
matter.
2015-12-15 17:53:36 +01:00
Florian Bruhin
90c782a891 Revert "Avoid setenv substitution in tox.ini."
This reverts commit 7245e300e6.
This was fixed in tox 2.3.1.
2015-12-15 11:49:06 +01:00
Florian Bruhin
a2423b0b6c tox: Update hypothesis to 1.17.0.
This is actually the same release as 1.16.1, but 1.16.1 has been pulled because
it contains the following additional change that was not intended to be in a
patch release (it's perfectly stable, but is a larger change that should have
required a minor version bump):

Hypothesis will now perform a series of "health checks" as part of running your
tests. These detect and warn about some common error conditions that people
often run into which wouldn't necessarily have caued the test to fail but would
cause e.g. degraded performance or confusing results.
2015-12-15 11:48:07 +01:00
Florian Bruhin
fd96685b02 tests: Wait until the qutebrowser window has focus.
This should fix the second case in #1183 and other related flakiness in
keyinput.feature.
2015-12-15 07:43:14 +01:00
Florian Bruhin
c74bcf95aa tox: Update hypothesis to 1.16.1.
A small bugfix release that allows bdists for Hypothesis to be built under 2.7
- the compat3.py file which had Python 3 syntax wasn't intended to be loaded
under Python 2, but when building a bdist it was. In particular this would
break running setup.py test.
2015-12-15 06:59:06 +01:00
Florian Bruhin
ee845590b7 Limit colorama to <=0.3.3 for requirements.io. 2015-12-14 18:44:16 +01:00
Florian Bruhin
0f97fad87d Revert "requirements: Update colorama to 0.3.5."
This reverts commit 06298022a3.

We get this when the tests finished running:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/colorama/initialise.py", line 19, in reset_all
    AnsiToWin32(orig_stdout).reset_all()
  File "/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/colorama/ansitowin32.py", line 67, in __init__
    strip = conversion_supported or not is_a_tty(wrapped)
  File "/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/colorama/ansitowin32.py", line 17, in is_a_tty
    return hasattr(stream, 'isatty') and stream.isatty()
ValueError: I/O operation on closed file
2015-12-14 07:14:39 +01:00
Florian Bruhin
879f99bddf tox: Update pytest to 2.8.5.
- fixed issue where class attributes injected during collection could break pytest.
- precompute junitxml chunks instead of storing the whole tree in objects
- fix ``pytest.deprecated_call()`` receiving multiple arguments
  (Regression introduced in 2.8.4).
2015-12-13 13:17:53 +01:00
Florian Bruhin
06298022a3 requirements: Update colorama to 0.3.5.
0.3.5
- Bumping version to re-upload a wheel distribution

0.3.4
- stream redirection now strips ANSI codes on Linux
- strip readline markers
- assign orig_stdout and orig_stderr when initialising
- Fore.RESET did not reset style of LIGHT_EX colors. Fixed by Andy Neff
- add context manager syntax. Thanks to Matt Olsen.
- colorama didn't work on Windows when environment variable 'TERM' was set.
- fix pylint errors in client code.
- Changes to readme and other improvements by Marc Abramowitz and Zearin
2015-12-13 13:11:50 +01:00
Florian Bruhin
430b133c41 userscripts: Add docs for _QtFIFOReader attributes. 2015-12-13 13:11:06 +01:00
Florian Bruhin
494d48aac1 userscripts: Make fifo private in _QtFIFOReader. 2015-12-12 00:33:50 +01:00