Commit Graph

1261 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
b465c109ee Fix test_editor_bdd.py for windows.
- Use a raw string to handle windows path separators
- Use SIGTERM instead of SIGUSR1
2017-11-29 07:42:12 -05:00
Florian Bruhin
af638ec430 Move hint unittests to their own file 2017-11-29 10:44:32 +01:00
Florian Bruhin
911616707e Merge remote-tracking branch 'origin/pr/3329' 2017-11-29 10:40:40 +01:00
Jay Kamat
19cecbdeae
Fix style issues in scattered hint tests 2017-11-28 22:08:22 -05:00
Florian Bruhin
43ff35eaea Revert "Make sure docs are up-to-date for navigate.feature"
This action doesn't exist in navigate.feature

This reverts commit 3857491cf9.
2017-11-28 22:15:56 +01:00
Florian Bruhin
3857491cf9 Make sure docs are up-to-date for navigate.feature 2017-11-28 17:06:41 +01:00
Ryan Roden-Corrent
01a9405391 Make ophaned editor test less flaky.
Instead of having the editor sleep a short time, explicitly send it a
signal to exit.
2017-11-28 08:38:04 -05:00
Florian Bruhin
9a8d68aa25 Mark :undo test as flaky
I don't get why it fails sometimes - so another @flaky stop-gap for now.
2017-11-28 09:19:37 +01:00
Florian Bruhin
0e80be2d30 Clear end2end test data again after initializing
If we don't do this, earlier tests can affect later ones when e.g. using "...
should not be logged", as we don't really wait until a test has been fully
finished.
2017-11-27 20:10:38 +13:00
Jimmy
dd59f8d724 Greasemonkey: add more end2end tests
Test document-end and noframes. Because coverage.py told me to.
Hopefully this doesn't slow the test run down too much, particularly the
"should not be logged" bit.

I'm just reusing and existing test html page that used an iframe because
I'm lazy.
2017-11-27 20:10:38 +13:00
Jimmy
4c3461038d Greasemonkey: add minimal end-to-end test.
Just runs a greasemonkey script on a test page and uses console.log to
ensure it is running.

Tests @include, and basic happy path greasemonkey.py operation (loading
and parsing script, scrip_for on webkit), only testing document-start
injecting point but that is the troublsome one at this point.

Tested on py35 debian unstable (oldwebkit and qtwebengine5.9) debian
stable qtwebengine5.7.

Note the extra :reload call for qt5.7 because document-start scripts
don't seem to run on the first page load with the current insertion
point. I need to look into this more to look at ways of fixing this.
2017-11-27 19:27:31 +13:00
Ryan Roden-Corrent
54fffc8264 Resolve crash when editor tab is closed.
If an editor is open on a form in a tab and that tab is closed, rewire
the callback to print a warning. Previously, the callback would access a
deleted C++ object and cause a crash.
Resolves #2758.
2017-11-26 07:50:49 -05:00
Jay Kamat
c9af36909f
Add tests for hint scattering 2017-11-24 13:21:21 -05:00
Florian Bruhin
03a9cbdfb4 Break long lines
(cherry picked from commit 18a45bbd5b0492785cfc6e9b541d816ed8ec5c54)
2017-11-24 16:03:34 +01:00
Florian Bruhin
06fc52321e Ignore new Qt 5.9.3 error message 2017-11-24 14:24:15 +01:00
Florian Bruhin
28d7c5e204 Fix lint 2017-11-24 07:25:10 +01:00
Ryan Roden-Corrent
8eab402820 Abort :edit-command on invalid input.
Show an error message if the user edits the command such that it is
missing a start character (:, /, or ?). Previously, this would cause the
browser to crash.

Resolves #3326.
2017-11-23 08:15:27 -05:00
Florian Bruhin
72d466d236 Break long lines 2017-11-22 11:34:10 +01:00
Florian Bruhin
cbf5fc01fa Avoid more about:blank loads 2017-11-22 10:15:18 +01:00
Florian Bruhin
12f4940ef3 Make :jseval use a fixed path with relative paths 2017-11-22 09:37:17 +01:00
Florian Bruhin
401a37bf4b Stabilize :spawn with userscript tests 2017-11-22 08:43:47 +01:00
Florian Bruhin
e5cabb6d23 Match QtWebKit error message for qute://help/img test 2017-11-22 08:40:20 +01:00
Florian Bruhin
aa417019ae Try stabilizing loading about:blank in end2end tests 2017-11-22 07:59:22 +01:00
Florian Bruhin
8acfe501fe Revert "Stabilize cleaning up open tabs"
We're going to fix this in a more generic way.

This reverts commit 8440303d82.
2017-11-22 07:56:31 +01:00
Florian Bruhin
b684e50cdf Stabilize view-source test 2017-11-21 18:14:17 +01:00
Florian Bruhin
8440303d82 Stabilize cleaning up open tabs
For some reason, about:blank isn't properly loaded sometimes. But this should
always work.
2017-11-21 14:53:31 +01:00
Florian Bruhin
cff557d2fc Try to stabilize command test, take 2 2017-11-21 13:19:11 +01:00
Florian Bruhin
56d1c5c7dd Stabilize command history test 2017-11-21 11:31:22 +01:00
Florian Bruhin
54af872825 Add missing comma 2017-11-21 10:45:49 +01:00
Florian Bruhin
25be4d4383 Merge remote-tracking branch 'origin/pr/3318' 2017-11-20 21:16:57 +01:00
Florian Bruhin
a5d9661d73 Simplify is_ignored_lowlevel_message 2017-11-20 19:29:31 +01:00
Ryan Roden-Corrent
5495380580 Exit command mode after :edit-command --run.
Resolves #3317, where the command prompt was left open and populated
with text after running the command.
2017-11-20 11:46:26 -05:00
Florian Bruhin
abb5c9f638 Ignore Qt 5.7 OpenSSL logging message 2017-11-20 13:58:37 +01:00
Florian Bruhin
3b680d0bff Pass --disable-seccomp-filter-sandbox for tests with Qt 5.7.1
This is a stop-gap so I'm able to run end2end tests at least.
See #3163.

For unit tests, we need https://github.com/pytest-dev/pytest-qt/pull/193 first.
2017-11-20 13:54:52 +01:00
Florian Bruhin
8555b86e3b Add copyright notice for pyeval_file.py 2017-11-19 21:09:48 +01:00
Florian Bruhin
a2c549b954 Merge remote-tracking branch 'origin/pr/3313' 2017-11-19 21:09:19 +01:00
Florian Bruhin
62f37df573 Make cursor keys go through completion if a text was entered
This hopefully helps with people who try to use arrow keys for the completion,
while still making the command history somewhat discoverable.
2017-11-19 20:35:16 +01:00
Akhil kp
21e731ebeb fixed build errors(typing errors) 2017-11-19 23:49:11 +05:30
akhilkpdasan
4644642c38
fixed test for pyeval --file 2017-11-19 19:10:36 +05:30
Florian Bruhin
91c909cb80 Merge remote-tracking branch 'origin/pr/3212' 2017-11-19 14:24:40 +01:00
Florian Bruhin
8c7bf12b88 Merge remote-tracking branch 'origin/pr/3306' 2017-11-19 14:08:58 +01:00
Akhil kp
c5eab53a87 Added --file for :debug-pyeval 2017-11-19 18:20:58 +05:30
Ryan Roden-Corrent
0f93d53210 Implement :edit-command.
:edit-command opens the current command line in an editor, and updates
the command line if the editor exits successfully. If --run is passed,
the command is executed when the editor exits sucessfully.

Resolves #2453.
2017-11-17 11:16:42 -05:00
Florian Bruhin
b26f2290bc Merge remote-tracking branch 'origin/pr/3097' 2017-11-16 11:14:59 +01:00
dwagle
233cea4b62 discarded unnecessary comment and adjusted some code to make pylint happy, also made adjustments to pytest scenarios 2017-11-15 15:48:21 +05:45
Panagiotis K
e4be834b39 Platform-agnostic test. 2017-11-15 09:51:05 +02:00
dwagle
b3b768f4a8 normalize url path and strip trailing slashes when doing gu/gU, normalize every qute://* urls and raise OSError when a url redirects to a directory in qute://help/ pages 2017-11-14 21:23:40 +05:45
Florian Bruhin
be08cee63c Make testsuite work with LC_ALL=C 2017-11-07 17:23:38 +01:00
Florian Bruhin
fdc43438ef Make tests for non-ASCII files work 2017-11-07 17:00:08 +01:00
Florian Bruhin
743dbbbcd6 Break long lines 2017-11-07 11:29:53 +01:00
Florian Bruhin
3eafdc13d7 Merge remote-tracking branch 'origin/pr/3177' 2017-11-07 11:17:00 +01:00
Jan Verbeek
3e8c84c018 Make :undo re-open all tabs closed by :tab-only
This changes the undo stack from a list of UndoEntry objects to a list
of lists of UndoEntry objects, so groups of tabs can be added. Only
:tab-only does that, but it's exposed by TabbedBrowser.close_tab as a
keyword argument.
2017-11-06 19:32:10 +01:00
Florian Bruhin
0053b10e4d Merge remote-tracking branch 'origin/pr/3243' 2017-11-06 16:26:21 +01:00
Florian Bruhin
378b280f9a Fix qute://gpl 2017-11-06 12:13:54 +01:00
Michael Hoang
966aa810df Set maxsplit to 0 on :buffer
Remove double quotes from tests
2017-11-06 06:41:43 +11:00
Michal Siedlaczek
3ac2cfdf73 Support updating dictionaries and removing old versions. 2017-11-04 18:16:05 -04:00
Florian Bruhin
1536c098cf
Merge pull request #3215 from deewakar/issue3161
Add trailing slash to qute://help pages
2017-11-03 11:49:31 +01:00
Ulrik de Muelenaere
72c57d16f4 Merge branch 'master' into stylesheet 2017-11-03 12:13:52 +02:00
Gyorgy Orban
bb54a954fe use subprocess run
The usage of subprocess.run is recommended since python 3.5.
Popen, check_call, call and check_output calls were replaced with run.
2017-11-01 09:59:32 +01:00
dwagle
95539961a4 made some adjustments in tests/end2end/features/qutescheme.feature for the tests to pass. These are to account for changes made in f70740c, 4c9482b and aab7496 2017-10-31 12:08:43 +05:45
dwagle
4c9482be84 added a Scenario: Opening link with qute://help to tests/end2end/features/qutescheme.feature 2017-10-30 17:49:22 +05:45
Florian Bruhin
9d415587bc Mark flaky test as flaky 2017-10-30 07:05:54 +01:00
Florian Bruhin
daee729fc2 Merge remote-tracking branch 'origin/pr/3200' 2017-10-30 06:58:46 +01:00
Ulrik de Muelenaere
51d48f6b00 Rewrite user stylesheet injection for WebEngine
This now works correctly in XML documents. The stylesheet is applied at
document creation to reduce flickering, and is updated if the
user_stylesheets setting is changed after page load.
2017-10-28 22:16:29 +02:00
Florian Bruhin
023c59f8c0 Reset the webserver process correctly between tests
If we don't call before_test(), if the server shows an error, all following
tests will fail.

See #3207
2017-10-28 17:29:55 +02:00
Ryan Roden-Corrent
24f466b2c3 Add --related flag to edit-url. 2017-10-26 22:13:35 -04:00
Ryan Roden-Corrent
6519f500a9 Add --private flag to edit_url.
The command :edit-url --private (or :edit-url -p) will spawn a new
private window with the url input from the editor.

I had to add 'Given I have a fresh instance' to the feature file to
ensure tests were not interfering.

Resolves #3185.
2017-10-26 07:21:51 -04:00
Florian Bruhin
02c996a785 Fix wrong 'When' in bdd file 2017-10-26 09:47:02 +02:00
Florian Bruhin
eee5f8263f Merge remote-tracking branch 'origin/pr/3179' 2017-10-26 09:43:42 +02:00
Florian Bruhin
1c9dc581a4 Skip "Clearing history" test on Windows 2017-10-26 08:45:15 +02:00
Luca Benci
df3f0124fc Add test 2017-10-25 21:37:22 +02:00
Florian Bruhin
2051a5d95e Stabilize :history-clear test
Something seems special with the previous view:source tab which prevents us
from loading the new page.

See #3003
2017-10-25 14:08:31 +02:00
Florian Bruhin
94f8bb9574 bdd tests: Make sure initial about:blank check is redone on restart
When we did "Given I have a fresh instance", we immediately did run the commands
without waiting for the initial about:blank load again.

With Qt 5.10, this causes issues as the loadFinished signal is emitted with
about:blank then, and not the real URL.

See #3003
2017-10-25 14:06:55 +02:00
Christopher Pezley
f67c445f3d Add test for opening non-ascii paths from command line. 2017-10-23 22:27:00 +02:00
siddhugolu
bc9d305354 modified as requested 2017-10-23 01:46:02 +05:30
siddhugolu
4862b2faf9 modified pylint pragmas 2017-10-22 23:52:35 +05:30
Christopher Pezley
f53d8135b0 Add test for opening non-ascii paths. 2017-10-22 19:39:46 +02:00
Michael Hoang
e5f2d27ed9 Ensure that a window with the given win_id exists 2017-10-22 08:22:45 +11:00
Jay Kamat
5ba4e13cab
Fix typo in :home on pinned tab test 2017-10-21 01:32:56 -04:00
Florian Bruhin
fd8e5e30c6 Re-add scroll filtering and disable it for mark/scroll tests
See #2233
2017-10-20 07:38:51 +02:00
Jay Kamat
5d11a1fd75
Prevent :home from bypassing pinned tab warnings
Closes #3138
2017-10-17 11:37:37 -04:00
Florian Bruhin
44e5dc1c5a Add a comment to @xfail_norun 2017-10-17 10:45:58 +02:00
Florian Bruhin
458a45c172 Remove old deprecated commands 2017-10-17 10:44:22 +02:00
Florian Bruhin
cce4ff6d53 Merge remote-tracking branch 'origin/pr/3054' 2017-10-17 09:10:45 +02:00
Florian Bruhin
8acd014d39 Ignore new Qt 5.10 debug build messages 2017-10-17 06:22:26 +02:00
Florian Bruhin
2eba2cc8f5 Skip another history test on AppVeyor 2017-10-15 00:26:26 +02:00
Florian Bruhin
db8fa5fdb6 Skip "History with invalid URL" test on Windows
For some reason, this hangs a lot on AppVeyor
2017-10-13 10:45:40 +02:00
Panagiotis K
630384e07f Fix tests. 2017-10-13 10:39:34 +03:00
Florian Bruhin
dfe2f9e38c Also check PyQt version for qtutils.version_check()
With an older PyQt built against a newer Qt, we still don't have its features
available.

This also drops support for exact=True with compiled=True as the semantics for
that are unclear, and it's not used.
2017-10-12 19:13:20 +02:00
Panagiotis K
0a753915ff Prompt for non-existing download directories.
Closes #2120
2017-10-12 15:00:35 +03:00
Florian Bruhin
e9a50f5f9f Another attempt at stabilizing qutescheme.feature 2017-10-11 08:46:53 +02:00
Michael Hoang
29f66dcd95 Merge :tab-detach with :tab-give 2017-10-11 17:18:12 +11:00
Florian Bruhin
0cd5d4300b Rename qt_args and force_software_rendering to add qt. prefix
Closes #3077
2017-10-11 07:45:38 +02:00
Michael Hoang
67437a0d5d Add :tab-give and :tab-take commands and tests 2017-10-11 16:27:35 +11:00
Florian Bruhin
211de6d664 Leave qute://settings after tests are done
Let's see whether this helps with the flakyness where the next test (for pyeval)
tries to set frame_flattening...
2017-10-10 21:45:57 +02:00
Florian Bruhin
1d1faf8d25 Merge remote-tracking branch 'origin/pr/2940' 2017-10-08 16:53:10 +02:00
Florian Bruhin
277daa334d Merge remote-tracking branch 'origin/pr/2891' 2017-10-08 15:23:01 +02:00
Michal Siedlaczek
00666feaf6 FAQ update for spellcheck & test fix 2017-10-07 15:54:22 -04:00
Bryan Gilbert
be3727a599 Improved zoom level management and enforcement 2017-10-06 20:30:06 -04:00
Florian Bruhin
e1d358f4c1 Ignore another Qt error message 2017-10-06 08:50:57 +02:00
Florian Bruhin
acf3945efc Mark hints.auto_follow_timeout test as flaky
It fails on CI sometimes when the CI is too slow
2017-10-06 08:48:47 +02:00
Florian Bruhin
a7955505be Try stabilizing completion test 2017-10-05 20:03:35 +02:00
Michal Siedlaczek
fd9a5fa334 Style fixes 2017-10-05 09:56:13 -04:00
Florian Bruhin
d3d644d6a5 Try to stabilize :window-only test 2017-10-04 21:09:46 +02:00
Michał Siedlaczek
e20ad95666 Merge branch 'master' into spell 2017-10-04 09:47:42 -04:00
Michal Siedlaczek
6a486058c5 Review fixes 2017-10-04 09:22:35 -04:00
Florian Bruhin
f0c0fea281 Merge branch 'pr/3025' 2017-10-04 09:28:40 +02:00
Florian Bruhin
96ff0c61ef Try to stabilize :completion-item-del for :buffer test 2017-10-04 09:11:02 +02:00
Florian Bruhin
3b689166f8 Skip flaky :buffer test entirely 2017-10-04 09:10:48 +02:00
Michal Siedlaczek
932e7a9ab9 Review fixes 2017-10-03 20:07:06 -04:00
Florian Bruhin
feaccb3083 Rename :scroll-perc to :scroll-to-perc
Closes #2819
2017-10-03 22:59:32 +02:00
Florian Bruhin
16d369d98c bdd: Include captured log when subprocess didn't start
Fixes #3052
2017-10-03 21:13:56 +02:00
Florian Bruhin
22088d9f7b Remove --force for :bind and config.bind(...)
Turns out --force is just in the way for most people, and at least for default
bindings it's easy to reset them.

Also, it makes :config-source fail when config.py contains keybindings.

Closes #3049
2017-10-03 20:43:38 +02:00
Michael Hoang
c8c6199369 Add tests for :set-cmd-text --run-on-count 2017-10-04 03:57:26 +11:00
Florian Bruhin
586c6e810f Fix xfail check 2017-10-03 13:58:53 +02:00
Florian Bruhin
9f10fa105c Merge adblock.feature into misc.feature 2017-10-03 13:42:04 +02:00
Florian Bruhin
2f9d1875cd Clear BDD process settings between each test
Fixes #1310
2017-10-03 13:38:16 +02:00
Michael Hoang
8ae0bd2797 Update :buffer tests for count support 2017-10-02 23:44:04 +11:00
Florian Bruhin
506b1cdbc1 Improve input.insert_mode.auto_load tests
This also adds a test for #2858 (also see #2879)
2017-10-02 09:04:37 +02:00
Florian Bruhin
4b9bbaa04d Skip test_force_software_rendering with QtWebKit 2017-09-28 17:30:53 +02:00
Florian Bruhin
6496442503 Skip test_force_software_rendering on CI
We can't be sure we have hardware acceleration there
2017-09-28 11:42:02 +02:00
Florian Bruhin
45c6ffe991 Add a test for force_software_rendering 2017-09-28 10:04:47 +02:00
Florian Bruhin
dba631102a Try to stabilize :window-only test 2017-09-26 08:41:07 +02:00
Florian Bruhin
c7c198b949 Stabilize hint test 2017-09-25 08:22:40 +02:00
Michal Siedlaczek
b840b8066b Spell only when pyqt>=5.8 2017-09-22 11:16:59 -04:00
Michal Siedlaczek
2150154350 Skip end2end spell tests if a dictionary is/isn't installed 2017-09-21 16:36:47 -04:00
Michal Siedlaczek
329cfa5756 End2end tests for spell checking 2017-09-21 09:56:33 -04:00
Florian Bruhin
e0e7d4ca67 Stabilize test_quitting_process_expected 2017-09-21 13:42:24 +02:00
Florian Bruhin
192c063743 Mark another window.open test as flaky
See https://travis-ci.org/qutebrowser/qutebrowser/jobs/277846887
2017-09-21 08:58:56 +02:00
Florian Bruhin
ef1c83862b Use utils.is_* for platform checks everywhere 2017-09-20 11:10:24 +02:00
Florian Bruhin
3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin
55a4eb18f2 Get rid of httpbin
Fixes #2949
2017-09-19 10:35:54 +02:00
Florian Bruhin
3772dc5930 Drop legacy QtWebKit support
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
505321c336 Drop support for Python 3.4
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
852baaa8c3 Drop support for Qt < 5.7.1
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
4c616a5733 Move all documentation files to doc/ 2017-09-17 21:27:38 +02:00
Florian Bruhin
21a10fcb17 Break up long line 2017-09-17 16:33:37 +02:00
Florian Bruhin
f85f4630ff Turn off SQL history writing during end2end tests
This hopefully makes them a bit faster, and also should help with weird hangs we
had in tests.
2017-09-17 10:58:30 +02:00
Florian Bruhin
f6d878f33f Mark window.open test as flaky 2017-09-17 10:36:28 +02:00
Florian Bruhin
624c3a4c27 Merge branch 'new-config' 2017-09-16 16:12:21 +02:00
Florian Bruhin
0aa85f5967 Skip SSL download test if SSL is not supported
This makes the testsuite pass entirely with a PyPI PyQt and OpenSSL 1.1
2017-09-16 10:43:59 +02:00
Florian Bruhin
54214873f4 Resurrect :debug-cache-stats test 2017-09-15 14:16:42 +02:00
Florian Bruhin
5a11c96e56 Don't fail tests because of OpenSSL 1.1 warnings
"Downloading with SSL errors" from downloads.feature still fails, but like this,
at least all other tests pass without the need to modify LD_LIBRARY_PATH.
2017-09-14 18:23:40 +02:00
Florian Bruhin
ed6933a839 tests: Ignore "Invalid node channel message" log from Chromium 2017-09-14 16:15:07 +02:00
Florian Bruhin
0a3a1b756d Mark confirm_quit test to only run on Windows
See #2964
2017-09-14 16:14:01 +02:00
Florian Bruhin
6618c3a6e8 Don't use shlex for configtypes.ShellCommand
We accidentally did show the command as a list in to_str(). However, after
correcting that to use shlex.escape, we got ugly qutebrowser command lines
when tabbing to the default value, because of how shlex handles double-escaping:

>>> print(shlex.quote("gvim -f '{}'"))
'gvim -f '"'"'{}'"'"''

While in this case, outputting "gvim -f '{}'" would be much more appropriate, it
doesn't look like we can teach shlex.quote to do that.

Instead, we now only accept a list as input for ShellCommand, at the price that
the user needs to do
  :set editor.command '["gvim", "-f", "{}"]'
instead of
  :set editor.command 'gvim -f {}'

Fixes #2962.
2017-09-14 14:44:24 +02:00
Florian Bruhin
5cd14c941b Fix race condition is :jseval test 2017-09-14 09:33:58 +02:00
Florian Bruhin
d1e69a75dd tests: Ignore some more Mac Mini messages 2017-09-14 00:37:54 +02:00
Florian Bruhin
cee51df4fb Refactor JS log handling and use a dict for javascript.log
Fixes #2828
2017-09-14 00:37:01 +02:00
Florian Bruhin
1fc9817cd4 Remove support for ambiguous keybindings 2017-09-14 00:37:01 +02:00
Florian Bruhin
08b5fc8e3b Stabilize qute://plainlog test
Looks like we actually get a loading event on Qt 5.9 just fine, and there was a
race condition here otherwise.
2017-09-13 21:32:36 +02:00
Florian Bruhin
0498e042a0 Ignore another macOS log line 2017-09-13 21:32:22 +02:00
Florian Bruhin
8c4bc76de6 Stabilize hint test which failed on macOS 2017-09-13 17:26:56 +02:00
Florian Bruhin
56b673ca05 tests: Don't use <Ctrl+Backspace> to clear qute://settings fields
This won't work on macOS
2017-09-13 10:29:54 +02:00
Florian Bruhin
9bcd120dcc Only mark completion issue as flaky 2017-09-11 19:33:27 +02:00
Florian Bruhin
f6a0500bd3 Merge branch 'master' into new-config
This pulls the travis changes to drop the old Qt 5.2 environment.
2017-09-11 18:39:41 +02:00
Florian Bruhin
a65d70820a Add macOS xfail for session completion test
See #2956
2017-09-11 18:33:08 +02:00
Florian Bruhin
50d43b0678 Fix some macOS testsuite issues 2017-09-11 18:33:08 +02:00
Florian Bruhin
2538fec0c5 Ignore Mach IPC message 2017-09-11 18:33:08 +02:00
Florian Bruhin
f320da07b4 Increase timeout for test_version 2017-09-11 18:33:07 +02:00
Florian Bruhin
9e10f891ff Print output earlier in test_version 2017-09-11 18:32:23 +02:00
Florian Bruhin
9a8088586f tests: Ignore dbus-uuidgen error messages 2017-09-11 18:32:23 +02:00
Florian Bruhin
1491f20201 Remove geolocation tests
They just cause more trouble than they're worth.
2017-09-11 18:32:23 +02:00
Florian Bruhin
a283a1bb65 Merge branch 'master' into new-config 2017-09-09 10:52:02 +02:00
Ryan Roden-Corrent
a6d14ad7dc Fix two new-config/master merge resolutions.
Remove icon from jinja.render call (removed in master).
Add 'When the unwritable dir is unwritable' to download feature file.
2017-09-07 08:58:55 -04:00
Ryan Roden-Corrent
6a292f9d56 Merge quteurls.feature into qutescheme.feature. 2017-08-28 07:18:14 -04:00
Ryan Roden-Corrent
61a03a7808 Add quteurls.feature
Move Scenario: Open qute://version from misc.feature to quteurls.feature
See #2779.
2017-08-27 22:37:04 -04:00
Ryan Roden-Corrent
722137ab29 Fix 2 end2end tests for config/completion merge. 2017-08-20 21:15:25 -04:00
Ryan Roden-Corrent
0286e9ddf2 Fix completion tests after config merge. 2017-08-20 21:12:38 -04:00
Jay Kamat
7073c33dce
Test for saving a session with --only-active-window 2017-08-17 22:27:40 -04:00
Ryan Roden-Corrent
71b71dbc58 Merge remote-tracking branch 'upstream/master' into HEAD 2017-08-06 18:13:49 -04:00
Florian Bruhin
5ecda25fdb Fix renderer process test for older Qt versions 2017-07-25 17:35:42 +02:00
Florian Bruhin
792a01ba6d Try to stabilize renderer process test 2017-07-25 16:56:38 +02:00
Florian Bruhin
07b2fde2de Mark test_version as flaky
Sometimes it fails on Travis with empty output for no apparent reason
2017-07-24 08:05:51 +02:00
Florian Bruhin
56b4989f44 Fix tests for QProcess changes 2017-07-23 22:10:50 +02:00
Florian Bruhin
fba25338be Merge pull request #2295 from rcorre/really_complete
Completion refactor V3
2017-07-21 15:05:43 +02:00
Florian Bruhin
cbf9da0b7e Set window.navigator.languages correctly 2017-07-13 21:24:17 +02:00
Florian Bruhin
ac8fb03b80 Fix lint 2017-07-10 20:37:30 +02:00
Florian Bruhin
135fb042da Make settings from qute://settings persistent 2017-07-10 18:04:39 +02:00
Florian Bruhin
84c2289aa5 Merge branch 'master' of https://github.com/iordanisg/qutebrowser 2017-07-09 12:56:52 +02:00
Florian Bruhin
915cd5f016 Fix long lines 2017-07-09 11:51:22 +02:00
Florian Bruhin
ad615941a2 Replace OS X with macOS 2017-07-08 11:12:43 +02:00
Iordanis Grigoriou
3bfafb5e50 Refactor suggested_fn_from_title, add unit tests 2017-07-06 17:41:54 +02:00
Iordanis Grigoriou
57e4d4978b Use page title only for whitelisted extensions 2017-07-06 11:59:02 +02:00
Ryan Roden-Corrent
dc4472470e Merge remote-tracking branch 'upstream/master' into really_complete 2017-07-05 08:45:57 -04:00
Florian Bruhin
45b1285402 Merge pull request #2765 from jgkamat/jay/tab-crashes
Refactor set_tab_pinned to take a tab widget.
2017-07-04 17:24:10 +02:00
Florian Bruhin
0cdd3ff82f Update some more references to old config options 2017-07-04 16:46:02 +02:00
Florian Bruhin
770c879410 Bring back searchengine BDD tests 2017-07-04 15:39:07 +02:00
Florian Bruhin
cff61fa0bc Fix pylint
This also reverts commit 8df0b063be.
2017-07-04 15:34:10 +02:00
Florian Bruhin
acf85eb96b Stabilize qute://settings test 2017-07-04 15:09:23 +02:00
Florian Bruhin
a36f5bafc1 Rename content.javascript.can_*_windows to _tabs 2017-07-04 15:08:04 +02:00
Florian Bruhin
5ada3606d8 Allow to not send the DNT header 2017-07-04 15:08:04 +02:00
Florian Bruhin
202b8445f6 Move content.accept_language under headers 2017-07-04 15:08:04 +02:00
Florian Bruhin
8712fc6fd3 Move new_instance_open_target out of url.
It doesn't really fit there really...
See 3cf028db23cbfe256e499d8881c3c2856f224d94
2017-07-04 15:08:04 +02:00
Florian Bruhin
07d0ea6a54 Unit tests and improvements for :bind/:unbind 2017-07-04 15:08:03 +02:00
Florian Bruhin
353c10aee7 Add a separate qutescheme BDD file 2017-07-04 15:08:03 +02:00
Florian Bruhin
3edebce833 Add tests for :set 2017-07-04 15:08:03 +02:00
Florian Bruhin
df1685905e Add content.headers and content.cache groups 2017-07-04 15:08:03 +02:00
Florian Bruhin
50602cbf26 Add an url. group to settings 2017-07-04 15:08:03 +02:00
Florian Bruhin
ac64ea287a Rename tabs.new_position/_explicit to .related/.unrelated 2017-07-04 15:08:03 +02:00
Florian Bruhin
c141c33b32 Clean up start_pages setting
The value is now of type FuzzyUrl, and the setting is renamed to start_pages.
2017-07-04 15:08:03 +02:00
Florian Bruhin
ad919fc972 Add a test for :bind with a wrong mode 2017-07-04 15:08:03 +02:00
Florian Bruhin
23d30d4fc0 Fix remaining :bind/:unbind issues 2017-07-04 15:08:03 +02:00
Florian Bruhin
ba1bc29a97 Initial :bind/:unbind implementation 2017-07-04 15:08:02 +02:00
Florian Bruhin
d9f1c4595e Make "the option ... should be set to ..." unambiguous
Otherwise, it'd collide with the cookie check.
2017-07-04 15:08:02 +02:00
Florian Bruhin
3c2d568a2e Add an ID for qute://settings inputs 2017-07-04 15:08:02 +02:00
Florian Bruhin
ceca99a99c Fix :help with new config 2017-07-04 15:08:02 +02:00
Florian Bruhin
0d062b28bf Comment out failing test 2017-07-04 15:08:02 +02:00
Florian Bruhin
bd9b45bb96 tests: Fix more issues with new config 2017-07-04 15:08:02 +02:00
Florian Bruhin
089e1ee91b Rewrite various references to old settings 2017-07-04 15:08:02 +02:00
Florian Bruhin
88fb5bbd82 tests: Fix various issues with new config 2017-07-04 15:08:02 +02:00
Florian Bruhin
ab1b80967f Disable tests which won't work yet
They are re-enabled in later commits.
2017-07-04 15:08:02 +02:00
Florian Bruhin
f27978e268 Rename input.insert_mode.auto_focused to _load 2017-07-04 15:08:02 +02:00
Florian Bruhin
3470e9bf5d Fix invocation with -s 2017-07-04 15:08:02 +02:00
Florian Bruhin
d0904a9f67 Adjust test settings 2017-07-04 15:08:02 +02:00
Florian Bruhin
0c1f480fc1 Remove TODO for qute://settings on webengine 2017-07-04 15:08:01 +02:00
Florian Bruhin
3b53ec1cb6 Skip tests with permission changes if they didn't work
This e.g. wouldn't work inside of a Docker container otherwise.
2017-07-03 10:07:40 +02:00
Jay Kamat
2fbadc46d2 Remove error when count is invalid to :tab-pin 2017-06-30 09:57:39 -07:00
Jay Kamat
596dee69d6
Clean up pin_tab
Also add a test case for :pin-tab with an invalid count
2017-06-29 20:04:02 -07:00
Florian Bruhin
d132b6ed71 Fix :scroll-page with --bottom-navigate on QtWebEngine
There were two issues here:

- The comparison was backwards, causing scroller.at_bottom() to always return
  true.
- When zoomed in, jsret['px']['y'] can be a float, which means we can be
  slightly off when checking the difference - math.ceil() fixes that.
2017-06-29 22:39:48 +02:00
Iordanis Grigoriou
0a09758be1 Add file path to download 2017-06-27 12:21:25 +02:00
Florian Bruhin
5ec94f96fd Allow a trailing % for :zoom 2017-06-26 21:51:35 +02:00
Iordanis Grigoriou
a24d7f6686 Use page title for filename with :download 2017-06-26 12:25:03 +02:00
Florian Bruhin
06d4a24bd1 Merge branch 'master' of https://github.com/iordanisg/qutebrowser 2017-06-20 12:45:21 +02:00
Iordanis Grigoriou
f0ff02fcb2 Avoid throwing exception when no last focused tab exists 2017-06-19 15:48:17 +02:00
Florian Bruhin
4296a61b9a tests: Clean up check_history 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
c7a18a8b8d Fix tests for recent sql changes 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
1fe1813431 Fix pylint errors. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
cf23f42b99 Use splitlines in test_history_bdd again.
Just using read() returns a single string, and iterating over that
iterates over each character.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
3a4ef09f58 More sql code review fixes 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
6fc61d12fc Assorted small fixes for sql code review. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
42243d3d97 Add more performance logging to completion. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
b1b521e0c2 Fix two history tests added recently.
These were added on master and needed to be adjusted slightly for the
new history check (which doesn't rely on reading a history file
anymore).
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
20000088de Add debug-dump-history and fix sql history tests.
Trying to read from the sql database from another process was flaky.
This adds a debug-dump-history command which is used by the history BDD
tests to validate the history contents.

It outputs history in the old pre-SQL text format, so it might be
useful for those who want to manipulate their history as text.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
eb61269068 Fix qute://history javascript for SQL.
Returning "next" was no longer possible as the SQL query does not fetch
more items than necessary. This is solved by using a start time, a
limit, and an offset. The offset is needed to prevent fetching duplicate
items if multiple entries have the same timestamp.

Two of the history tests that relied on qute://history were changed to
rely on qute://history/data instead to make them less failure-prone.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
a8ed9f1c2f Fix qute://version sql init bug.
Calling sql.init() in version.version() would replace the existing sql
connection and cause a crash when accessed by opening qute://version.

Now version relies on sql already being initted, and app.py inits sql early if
the --version arg is given.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
231bbe7c2b Fix race condition on history tests.
Two history end2end tests are failing because sqlite is not flushing to disk in
time to be read by the test process. My understanding is that sqlite should
take an exclusive lock while writing, so it is difficult to understand why this
is happening. This can be fixed by adding a delay, but that seems flaky.

I'm fixing it by checking qute://history instead of reading the database file.

See:
https://github.com/qutebrowser/qutebrowser/pull/2295#issuecomment-292786138
and the following discussion.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
3e63b62d6e Fix pylint/flake8 for sql work. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
8ff45331df Clean up sql implementation.
Now that sql is only used for history (not quickmarks/bookmarks) a number of
functions are no longer needed. In addition, primary key support was removed as
we actually need to support multiple entries for the same url with different
access times. The completion model will have to handle this by selecting
something like (url, title, max(atime)).

This also fixes up a number of tests that were broken with the last few
sql-related commits.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
be07107b1c Fix end2end completion tests for SQL backend.
Change the logging to report the completion function name and have the end2end
tests check for this.

Remove the tests for realtime completion, as it was decided this is not an
important feature and the code is much simpler without it.
2017-06-19 07:42:12 -04:00
Florian Bruhin
9b5227b987 Improve test_version output 2017-06-19 09:06:18 +02:00
Florian Bruhin
9cc688ea2b Fix initial tab sizing with vertical tabbar 2017-06-16 23:00:16 +02:00
Iordanis Grigoriou
e14477375b Fix typo in test 2017-06-16 12:41:30 +02:00
Iordanis Grigoriou
f28d523225 Select the last focused tab when running ':tab-focus <current tab number>' 2017-06-16 12:28:56 +02:00
Florian Bruhin
54154e2434 Mark :stop test as flaky
Looks like the requests sometimes aren't updated, but I have no idea why.
2017-06-12 18:15:05 +02:00
Florian Bruhin
38d54cb112 Stabilize history tests
Get current URL right away in :view-source, and wait until source is shown in
the test.
2017-06-12 18:13:17 +02:00
Florian Bruhin
57fbfbd606 Set an initial window size for background tabs
When we open a background tab, it gets a hardcoded size (800x600 or so) because
it doesn't get resized by the layout yet.

By resizing it to the size it'll actually have later, we make sure scrolling to
an anchor in an background tab works, and JS also gets the correct size for
background tabs.

Fixes #1190
Fixes #2495
See #1417
2017-06-11 17:48:01 +02:00
Florian Bruhin
ad260366ef Remove ":messages without messages" test
We can never know for sure there aren't any messages - for example, on Travis we get a message about XDG_RUNTIME_DIR being unset on Qt 5.9.
2017-06-09 11:04:21 +02:00
Florian Bruhin
250da212cd Adjust tests for new QtWebKit-NG 2017-06-09 10:28:41 +02:00
Florian Bruhin
ddf4521305 Fix :messages tests 2017-06-08 14:16:30 +02:00