Florian Bruhin
08b70f0f4c
Add qutebrowser.utils.javascript
...
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
Florian Bruhin
23ce4561c8
Fix lint
2016-08-03 16:48:48 +02:00
Florian Bruhin
9851a13981
Add utils.random_port()
2016-08-03 13:08:55 +02:00
Florian Bruhin
a49c524b00
tests: Ensure LogLine gets the right json type
2016-08-03 09:06:58 +02:00
Florian Bruhin
190db8bf5e
Also pass -bb to python for end2end tests
2016-07-28 07:19:59 +02:00
Florian Bruhin
83906d223a
Remove unneeded pylint suppression
...
In the last CherryPy update, cherrypy.wsgiserver got converted to a
single module. While this issue still exists in pylint, we don't get it
here anymore.
2016-07-15 11:09:51 +02:00
Florian Bruhin
e0ab70c8cf
end2end tests: Don't fail with "STUB:" warnings
...
We have some things like pos_px stubbed which will fail any test because
of the stub warning - but some tests don't actually need that, it just
happens when e.g. loading something.
So let's not fail tests based on stub warnings, and see how much works
that way.
2016-07-13 10:55:04 +02:00
Florian Bruhin
e5cab11979
Escape backslashes in end2end test commands
...
Let's hope this fixes stuff on Windows where \ is used as path
separator...
2016-07-12 17:52:05 +02:00
Florian Bruhin
d91c922b4c
Add --qute-bdd-webengine switch for end2end tests
2016-07-11 17:24:03 +02:00
Florian Bruhin
bf286f8c74
Fix some tests
2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6
Fix some a/an misspellings
...
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Florian Bruhin
f6cd73c784
Merge branch 'expected-error' of https://github.com/Kingdread/qutebrowser into Kingdread-expected-error
2016-07-03 16:58:06 +02:00
Daniel Schadt
ee9d3b6a49
quteprocess: replace Expected with expected
2016-07-02 17:22:40 +02:00
Daniel Schadt
4863df5ac8
quteprocess: also mark expected WARNINGs
2016-07-02 17:19:19 +02:00
Daniel Schadt
e2b521a408
fix lint
2016-07-02 16:51:58 +02:00
Daniel Schadt
bce06d6f43
quteproc: mark expected errors as such
...
Fixes #1611
This marks errors that are expected by a test with an "(Expected)"
marker and white color (instead of red).
The formatting of the log messages has been deferred to _render_log,
since the .expected attribute is not correctly set right after we read
the message.
2016-07-02 13:59:46 +02:00
Florian Bruhin
274644e83d
tests: __tracebackhide__ in quteproc.after_test
2016-07-01 14:44:42 +02:00
Florian Bruhin
4fccc89d7d
Split browser into browser/browser.webkit
2016-06-13 11:18:21 +02:00
Florian Bruhin
d40e8e1c2f
tests: Set auto-save-interval to 0
...
Otherwise history tests could fail because waiting for
"Saved to *history" waited for a previous line, not the newest one.
It also doesn't make any sense to save stuff anyways.
2016-06-08 21:54:44 +02:00
Florian Bruhin
483a5f8103
Fix sharing of cookie jars with private browsing
...
Fixes #1219
2016-06-08 16:35:43 +02:00
Florian Bruhin
8c9bd95123
test webserver: Whitelist some more HTTP statuses
...
- HTTP 301 for redirect-to
- HTTP 404 for status/404
2016-06-08 15:15:54 +02:00
Florian Bruhin
a9f27e3247
bdd: Turn off colors with --color=no
2016-06-06 23:19:14 +02:00
Florian Bruhin
d91f4e13d0
Fix long line
2016-06-06 17:13:56 +02:00
Florian Bruhin
2f60073cdf
bdd: Allow to run invalid commands via quteproc
2016-06-06 16:10:01 +02:00
Daniel Schadt
a6b47a7c09
fix lint
2016-05-30 16:00:10 +02:00
Daniel Schadt
fa2636c2f6
tests: fix timezone issues for test_quteprocess
...
Depending on the timezone, you may either get 00:00 as time or 01:00,
which is bad for testing on different machines.
2016-05-30 16:00:10 +02:00
Daniel Schadt
65e5a3fe09
quteproc: match message with re.DOTALL
...
Since they may now contain newlines, we need to get the whole message,
which are otherwise not included in .
2016-05-30 16:00:10 +02:00
Daniel Schadt
f676a599a2
tests: remove leftover lines from writing the code
...
Those lines are not needed.
2016-05-30 16:00:10 +02:00
Daniel Schadt
484320ac19
quteproc: see lines starting with ' ' as error
...
Now that json logging is used, multiple lines should be correctly
escaped (and parsed), even in tracebacks, so this check should now be
obsolete.
2016-05-30 16:00:10 +02:00
Daniel Schadt
db240e294e
quteproc: delegate LogLine to log.ColoredFormatter
2016-05-30 16:00:10 +02:00
Daniel Schadt
cc7c477e3e
tests: add update tests for LogLine with json logs
2016-05-30 16:00:10 +02:00
Daniel Schadt
6a6f396f85
quteproc: set lineno to None if function is None
2016-05-30 16:00:10 +02:00
Daniel Schadt
cea32ea333
log: embed traceback in json object
2016-05-30 16:00:10 +02:00
Daniel Schadt
96b299a1fc
quteproc: Nicer output for unexpected errors
...
Instead of
LogLine('{"levelname": "ERROR", ...}')
we get
21:22:34 ERROR downloads mhtml ...
2016-05-30 16:00:10 +02:00
Daniel Schadt
b4022b9795
quteproc: fix log_color in log message
...
This actually uses the escape code, not just the color name.
2016-05-30 16:00:10 +02:00
Daniel Schadt
ae16240d41
quteproc: fix docstring in formatted_str
...
Autocomplete was faster and inserted .strip() after line
2016-05-30 16:00:10 +02:00
Daniel Schadt
cf3930f925
quteproc: except ValueError
...
There is no json.decoder.JSONDecodeError, it was a lie all along...
2016-05-30 16:00:10 +02:00
Daniel Schadt
4a59a1f112
log: implement JSON as logging output
...
Fixes #1501
Enabled via the --json-logging parameter.
2016-05-30 16:00:10 +02:00
Florian Bruhin
d385206ea0
tests: Set some settings for quteproc
...
We set ui -> message-timeout to 0 to get better error messages in the
log output and network -> ssl-strict to not hang on unexpected SSL
errors.
2016-05-29 23:40:09 +02:00
Florian Bruhin
2d9cf5ed3a
Handle invalid URLs in wait_for_load_finished_url
2016-05-29 22:16:55 +02:00
Florian Bruhin
119d76c502
Fix lint
2016-05-29 18:45:09 +02:00
Florian Bruhin
64d4c9f83e
Clean up end2end test file structure
...
This renames tests/integration to tests/end2end and moves some files to
tests/end2end/fixtures.
2016-05-29 18:20:00 +02:00