Commit Graph

1908 Commits

Author SHA1 Message Date
Daniel Schadt
e21bdab2c0 rename function to remove duplicate 2016-08-04 02:14:46 +02:00
Daniel Schadt
47b455957f tests: actually download file
Otherwise the :prompt-open-download will throw an error since the
request is not fast enough.
2016-08-04 01:47:02 +02:00
Daniel Schadt
8f4377937d use shlex.quote instead of "{}" 2016-08-04 01:41:50 +02:00
Daniel Schadt
cbe60b0638 add tests for download with special characters
See issue 1726.
2016-08-04 01:24:08 +02:00
Daniel Schadt
d2107498a2 add a test for downloads with long filenames
See issue #1725.
2016-08-04 01:06:42 +02:00
Daniel Schadt
1400a27508 more tests for OpenFileDownloadTarget 2016-08-03 18:14:45 +02:00
Daniel Schadt
afa7494c5f add tests for download-open/prompt-open-download
This has tests for
* standard :download-open
* standard :prompt-open-download
* :prompt-open-download + cancel the download (issue #1728)
2016-08-03 17:59:32 +02:00
Daniel Schadt
716ce701f5 utils: move elide_filename to own function
Also increase the elide limit in TempDownloadManager to 50, since that's
probably still enough for all systems.
2016-08-03 17:59:32 +02:00
nanjekyejoannah
4e93e04468 end2end testcase for issue #844 2016-08-03 18:55:33 +03: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
dbccb12b49 Move WrapperLayout to miscwidgets 2016-08-03 13:08:25 +02:00
Florian Bruhin
fa7f9955a3 Add test for BackendError 2016-08-03 12:18:15 +02:00
Florian Bruhin
1fb4aa3532 Merge branch 'tab-open-implicit' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-open-implicit 2016-08-03 09:16:49 +02:00
Florian Bruhin
a49c524b00 tests: Ensure LogLine gets the right json type 2016-08-03 09:06:58 +02:00
Marshall Lochbaum
97a249d8a6 Rewrite tests in open.feature 2016-08-02 15:27:26 -04:00
Marshall Lochbaum
66adbc9323 Add --implicit flag to :open 2016-08-02 13:49:25 -04:00
Marshall Lochbaum
c19e1947f8 Remove tests for cmdutils.arg_or_count (fixes #1735 with previous commits) 2016-08-02 12:02:40 -04:00
Marshall Lochbaum
8a127f2839 Remove cmdutils.arg_or_count 2016-08-02 11:31:03 -04:00
Florian Bruhin
424758a6d1 Use HTML content for localstorage test
JS logging is disabled by QtWebKit in private browsing mode
2016-08-02 15:18:25 +02:00
Florian Bruhin
43ff1b0d97 Tunnel private-browsing to QtWebKit correctly 2016-08-02 14:19:31 +02:00
Florian Bruhin
4a5b5c496f Fix using a relative path with --basedir 2016-08-02 14:08:28 +02:00
Florian Bruhin
483072d842 Don't use QSignalSpy in IPC test
Fixes #1727.

For another testcase in the same file we still need to use it until
pytest-qt has a MultiSignalBlocker.args.
2016-08-02 12:45:30 +02:00
Ryan Roden-Corrent
a393adc6c7 Don't crash completion with auto-open/show False.
If both are false, the selectionModel may be None.
In this case, don't try to move the index.
Resolves #1722.
2016-08-01 22:36:04 -04:00
Ryan Roden-Corrent
6e2d78b826 Don't crash on tab with no completions.
first_item and last_item return an invalid index when there are no
items in the completion, and the completionwidget will throw on an
invalid index. However, setting an invalid index on the selection view
is fine, so just remove the assertion.

Resolves #1731.
2016-08-01 22:16:55 -04:00
Florian Bruhin
ef439bb916 Fix ;o/;O default bindings 2016-08-01 18:19:34 +02:00
Florian Bruhin
5ec39b7540 Fix crash when opening http://foo%40bar@baz 2016-08-01 17:18:14 +02:00
Florian Bruhin
693210920c Fix completion widget unit tests 2016-08-01 16:29:47 +02:00
Florian Bruhin
15863065cb Fix <input /> test in test_webelem 2016-08-01 16:28:54 +02:00
Florian Bruhin
68b273de87 Merge branch 'generalize-list-type' of https://github.com/mlochbaum/qutebrowser into mlochbaum-generalize-list-type 2016-08-01 16:22:13 +02:00
Florian Bruhin
4414f5fea9 Merge branch 'tab-move-index' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-move-index 2016-08-01 16:17:09 +02:00
Florian Bruhin
62f9161d03 Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests 2016-08-01 16:02:53 +02:00
Florian Bruhin
86669600ff Consider input elements without type for hinting 2016-08-01 15:49:50 +02:00
Ryan Roden-Corrent
86a08d17c2 Dedupe code in test_readline.
Many of the tests repeated the same block of logic, so consolidate it
into one function.
2016-07-30 22:00:12 -04:00
Ryan Roden-Corrent
a086095954 Implement unix_filename_rubout.
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.

To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.

See #1710.
2016-07-30 19:34:38 -04:00
Ryan Roden-Corrent
6bcdacf1ce Implement readline's backward-kill-word.
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.

Resolves #1698.
2016-07-30 07:27:29 -04:00
Marshall Lochbaum
a7438f4f15 Extend tab-move's direction argument to take an index (fixes #1701) 2016-07-29 23:06:51 -04:00
Ryan Roden-Corrent
fbadc5e668 Remove second arg from on_selection_changed.
The deselected argument was unused, so remove it from the signal and
the slot.
2016-07-29 08:48:24 -04:00
Florian Bruhin
c40059715a Fix long line 2016-07-29 10:43:53 +02:00
Florian Bruhin
cffe2281b1 Use qtmodeltester for completion model tests
See http://pytest-qt.readthedocs.io/en/latest/modeltester.html
See #1702
2016-07-29 10:26:55 +02:00
Florian Bruhin
4bf94f3c24 Use order='strict' with qtbot.waitSignals
See #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
a7e9b4e5d7 Get rid of extend=True for qt_log_ignore
This is now the default, see #1702
2016-07-29 09:12:06 +02:00
Claire Cavanaugh
e409eafe2a Add test for opening a quickmark 2016-07-28 23:36:05 -07:00
Ryan Roden-Corrent
dd827332c0 Clean up unused imports from completion refactor. 2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
f31e890862 Move completion_item_{next,prev} to CompletionView.
These commands are more closely tied to the CompletionView than
Completer. This removes the need for an extra signal tying the
CompletionView to the Completer.

The call to _open_completion_if_needed was moved to
on_selection_changed, as this will already be called when a new item is
selected.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
ffc5a42d04 Don't use objreg to get CompletionView.
The CompletionView is the parent of the Completer, so there's no need
to use objreg to get it.
See #640.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
b9cf9d180b Decouple Completer and CompletionView.
Rather than having a CompletionView instantiate and register a
Completer, instantiate both in MainWindow. The CompletionView is the
parent of the Completer, and communicates by emitting
selection_changed, meaning it no longer needs to contain a reference to
the Completer.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
d836fcb118 Code review for completion tests.
- clean up docstring typos
- use _ to name an unused loop variable
- parent the filter model to avoid an issue with disposal
- use mocker.patch instead of monkeypatch to mock Completer creation
- use is instead of == to compare by identity
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
415ad7a638 Unit test completion view. 2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
a740f99607 Register the fake statusbar command in objreg.
The CompletionView looks in objreg for 'status-cmd', so move it from a
private fixture in test_completer to a public fixture that handles
objreg registration/deletion.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
e5da179ebf Limit the public interface of Completer.
Only schedule_completion_update and selection_changed are used
externally, so mark the rest of the API as private.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
aedf5b930a Test Completer.schedule_completion_update.
update_completion is only used internally, so instead test the real
public entry point which is schedule_completion_update.

This required mocking out QTimer to fire immediately so the test didn't
have to do flaky artificial delays.
2016-07-28 12:20:24 -04:00
Florian Bruhin
80d4af0da2 Add test webelem.__eq__ with other type 2016-07-28 17:29:45 +02:00
Florian Bruhin
a0ae96d43e Add more WebElementWrapper tests 2016-07-28 14:46:32 +02:00
Florian Bruhin
d357ccf403 Add some more WebElementWrapper tests 2016-07-28 14:25:53 +02:00
Florian Bruhin
c674bda43c Add new tests for test_webelem.test_vanished
This also adds test IDs for easier debugging.
2016-07-28 13:12:47 +02:00
Florian Bruhin
8d7baea9ae Fix test_passed_geometry 2016-07-28 12:36:09 +02:00
Florian Bruhin
ebc72c9b5f Fix TestRemoveBlankTarget.test_no_link 2016-07-28 12:36:09 +02:00
Florian Bruhin
540c62c232 Add only_visible to find_all_elements 2016-07-28 12:36:09 +02:00
Florian Bruhin
190db8bf5e Also pass -bb to python for end2end tests 2016-07-28 07:19:59 +02:00
Florian Bruhin
79b3f26de8 Decode HTML in test_filescheme
Otherwise we get a BytesWarning inside BeautifulSoup
2016-07-28 07:19:09 +02:00
Marshall Lochbaum
d51b1733e4 Add List to test_configtypes_hypothesis 2016-07-27 13:14:51 -04:00
Marshall Lochbaum
b205ad500b Add tests for configtypes.Url 2016-07-27 12:44:10 -04:00
Marshall Lochbaum
b4fec256dc Merge LengthList into List 2016-07-27 12:39:03 -04:00
Florian Bruhin
7605a4fb0c tests: Use pytest-warnings to handle warnings 2016-07-27 18:28:08 +02:00
Florian Bruhin
04aa98d7fb Release v0.8.1 2016-07-27 12:41:40 +02:00
Florian Bruhin
9ff006746f Handle empty command in CommandRunner.parse_all
Sicne we now call self._get_alias there, we also need to make sure it's
not an empty string before that.

Introduced in #1577. Fixes #1690.
2016-07-27 11:19:01 +02:00
Florian Bruhin
be609d5779 Improve logging for BaseKeyParser
See #1653
2016-07-27 10:27:53 +02:00
Florian Bruhin
ccbd47a0cd Merge branch 'savefile_open-flush' of https://github.com/flv0/qutebrowser into flv0-savefile_open-flush 2016-07-27 10:11:33 +02:00
Marshall Lochbaum
a3c7ed51d4 Create LengthList to remove WebKitBytesList and refactor Padding 2016-07-26 23:59:55 -04:00
Marshall Lochbaum
083baf1222 Remove unnecessary List subclasses 2016-07-26 23:05:42 -04:00
Marshall Lochbaum
9e86933913 Replace List with BaseList and rename GenList to List 2016-07-26 23:02:10 -04:00
Marshall Lochbaum
d77145a5b8 Add GenList type and refactor *List types to use GenList 2016-07-26 21:34:50 -04:00
Marshall Lochbaum
826d0befe0 Update number files 2016-07-26 13:57:35 -04:00
Marshall Lochbaum
b2c2d5a4f4 Add --delete option to bookmark-load 2016-07-26 13:49:17 -04:00
Marshall Lochbaum
ae7fe2ee33 Update number files 2016-07-26 09:14:51 -04:00
Marshall Lochbaum
28842c90b6 Add --toggle flag to bookmark-add (fixes #1667) 2016-07-26 09:07:21 -04:00
Florian Bruhin
b12c984846 Release v0.8.0 2016-07-26 13:30:41 +02:00
Florian Bruhin
3801960c61 tests: Add v0.8.0 to old_configs 2016-07-26 13:30:41 +02:00
Florian Bruhin
3ccb691e9f tab API: Rename scroll to scroller
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
214641301c Improve test_smoke
There's currently an error on exit which doesn't get caught with
--nowindow and not with ":later 500 quit".

We also need to check the output as there's an additional segfault when
that happens...
2016-07-26 12:51:12 +02:00
Florian Bruhin
3ea6d4c527 Add KeyConfigStub.get_reverse_bindings_for 2016-07-26 12:06:42 +02:00
Florian Bruhin
f4f6a3dac1 Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download 2016-07-26 10:32:34 +02:00
Marshall Lochbaum
028e7239ed Add more number files 2016-07-25 15:37:02 -04:00
Marshall Lochbaum
3ffb726b98 Merge branch 'master' into mark-del-no-args 2016-07-23 12:12:19 -04:00
Marshall Lochbaum
f52c7f13d3 Update numbers in urlmarks test 2016-07-23 12:05:26 -04:00
Marshall Lochbaum
9eeda62adf Use quickmark-add rather than quickmark-save in test 2016-07-23 12:05:26 -04:00
Florian Bruhin
91b754d6ea Merge branch 'issue_1033_bookmark_display' of https://github.com/winged/qutebrowser into winged-issue_1033_bookmark_display 2016-07-23 15:42:33 +02:00
David Vogt
1f320b8686 Various fixes after code review.
* Move documentation changes of bookmark / quickmarks to docstrings, as the
  asciidoc is autogenerated from those
* Fix some whitespaces in the BDD test cases
* Improved docstring in qute_bookmarks handler
2016-07-23 14:50:28 +02:00
Florian Bruhin
64f208486e Add log.ignore_py_warnings() 2016-07-23 13:04:45 +02:00
David Vogt
85be6565fc Implement feature request #1033: Bookmark display
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
2016-07-23 12:09:49 +02:00
Florian Bruhin
76eab7617b Remove @pyqtSlot for functions and non-QObjects
Fixes #1669
2016-07-23 11:42:50 +02:00
Marshall Lochbaum
e9660ad676 Fix incorrect number in test 2016-07-21 22:45:36 -04:00
Marshall Lochbaum
ff682606ab Add tests for bookmark-del and quickmark-del with no arguments 2016-07-21 22:34:10 -04:00
Florian Bruhin
a1c4e6e2cf Rename shadowed tmpdir variable 2016-07-20 16:13:46 +02:00
Florian Bruhin
c7eec246d3 Merge branch 'cut_test_clutter' of https://github.com/rcorre/qutebrowser into rcorre-cut_test_clutter 2016-07-20 15:28:58 +02:00
Florian Bruhin
bf06f4a4d7 tests: Use dedicated logger for message mock
The message mock might handle a message during pytest-qt's processEvents
during test setup. If that happens, depending on the fixture order,
pytest-caplog might not be set up first, which is why the
self._caplog.at_level call can fail:

  File "c:\projects\qutebrowser\qutebrowser\misc\guiprocess.py", line 105, in on_finished
    immediately=True)
  File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 71, in _handle_error
    self._handle(Level.error, *args, **kwargs)
  File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 65, in _handle
    with self._caplog.at_level(log_level):  # needed so we don't fail
  File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 232, in at_level
    obj = logger and logging.getLogger(logger) or self.handler
  File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 186, in handler
    return self._item.catch_log_handler
  AttributeError: 'Function' object has no attribute 'catch_log_handler'

Full stack:

    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(100)pytest_runtest_setup()
  -> _process_events()
    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(140)_process_events()
  -> app.processEvents()
    c:\projects\qutebrowser-git\qutebrowser\misc\guiprocess.py(94)on_error()
  -> self._what, msg), immediately=True)
    c:\projects\qutebrowser-git\tests\helpers\messagemock.py(71)_handle_error()
  -> self._handle(Level.error, *args, **kwargs)
    c:\projects\qutebrowser-git\tests\helpers\messagemock.py(65)_handle()
  -> with self._caplog.at_level(log_level):  # needed so we don't fail
    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(235)at_level()
  -> obj = logger and logging.getLogger(logger) or self.handler
  > c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(189)handler()->None

This should fix broken AppVeyor builds.

Fixes #1662.
2016-07-20 14:23:09 +02:00
Ryan Roden-Corrent
48dbf505ce Limit config_tmpdir use in test_configtypes.
Only use the fixture in the test class that tries to access the config
dir (TestFileAndUserStyleSheet) rather than the whole test.
2016-07-18 21:49:37 -04:00
Ryan Roden-Corrent
7b3406a3e4 Use monkeypatch.setenv instead of os.putenv.
This ensures the environment is modified only for the test using the
fixture rather than for the whole test run.
2016-07-18 21:39:35 -04:00
Florian Bruhin
8a290bf9b2 Add a test for #1657/#1658 2016-07-18 14:31:01 +02:00
Ryan Roden-Corrent
7d36847f77 Prevent test_tab from creating user data dir.
This is another case (like test_qt_javascript) that needs redirection
of XDG_DATA_HOME to prevent Qt from creating ~/.share/local/qute_test.
2016-07-17 07:07:05 -04:00
Ryan Roden-Corrent
5ae9d985b1 Prevent lingering object from test_config.
Using the config_tmdpir fixture across all tests in this module caused
a lingering LineParser to make test_debug fail.
I still don't know why, but scoping the config_tmpdir fixture to only
the test class that was creating ~/.config/qute_test fixes the issue,
and still prevents creation of a user tempdir.
2016-07-16 06:47:12 -04:00
Ryan Roden-Corrent
f589e44700 Don't write to user datadir in test_qt_javascript.
This was more complicated than the other data/config/cachedir test
fixes, as QtWebEngine was accessing the datadir directly (and bypassing
standdarddir.data).

This means the tmpdir_data stub is not enough, we need to set
XDG_DATA_HOME to redirect access.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
d9b546701e Prevent creation of user dirs on several tests.
Use the config_tempdir and data_tempdir fixtures for several tests that
were creation ~/.config/qute_test or ~/.local/share/qute_test.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
a6695ea1be Prevent test_adblock from creating real config dir.
Don't create ~/.config/qute_test by mocking out standdarddir.config for
all tests in this module.

This adds config_tmpdir to fixtures.py and moves temp_datadir from
test_adblock to fixtures.py as it will be needed more broadly.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
9c9b367887 Completely prevent tests from creating cachedir.
Attempting to fix the test on windows caused it to create the cachedir
again. The call to init(None) was unnecessary.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
cee5d6b97f Use fake_args in test_standarddir. 2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
34583d1565 Fix standarddir test on Windows.
Was broken by 48a2cad while trying to prevent creation of qute_test in
non-temp locations.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
1f71520bb2 Prevent tests from creating cachedir tag.
Running test_standarddir would pollute the user's home with
`~/.cache/qute_test`.

The `no_cachedir_tag` fixture was supposed to prevent this, but was not
working because [usefixtures does not work on fixtures]
(https://github.com/pytest-dev/pytest/issues/1014).

This fixes the fixture to actually prevent cachedir creation, but
applies it to tests individually (or by class) rather than with autouse
because the cachedir tests cannot pass if it is working.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
daaa5ff5c5 Don't create real config/data dirs from tests.
Running the tests would create ~/.config/qute_test and
~/.local/share/qute_test on the user's machine. The test_standardir
module needed a bit more mocking to prevent it from cluttering the
user's machine.

Two tests that created the data dir were fixed by passing basedir in
args, and one test that created the config dir was fixed by patching
os.makedirs to a noop.
2016-07-15 13:46:50 -04: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
7b9d38e438 Fix config values being lost with DELETED_OPTIONS
When an option was deleted, we accidentally stopped reading instead of
ignoring that one option and then resuming.
2016-07-14 16:58:54 +02:00
Florian Bruhin
325846f20a Remove doubled check 2016-07-14 16:33:59 +02:00
Florian Bruhin
ff89ae7839 Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master 2016-07-13 21:21:37 +02:00
Florian Bruhin
b59a1766c8 Fix long line 2016-07-13 21:19:02 +02:00
Florian Bruhin
c9176b7c58 QtWebEngine: Fix 'unset' with run_js_blocking 2016-07-13 18:17:37 +02:00
Florian Bruhin
a7509d5978 Fix lint 2016-07-13 16:01:12 +02:00
Jan Verbeek
13cbdbb8bd Record mode for :repeat-command before executing 2016-07-13 15:24:45 +02:00
Daniel Schadt
029ffe3fc7 tests: add tests for usertypes.DownloadTarget 2016-07-13 14:17:41 +02:00
Florian Bruhin
5b1cca92ab Add run_js_blocking to tab API 2016-07-13 13:47:30 +02:00
Florian Bruhin
4f97b6342d tests: Add a tab fixture in test_tab 2016-07-13 13:47:29 +02:00
Florian Bruhin
558ef290e4 tests: Add a view fixture in test_tab 2016-07-13 13:47:26 +02:00
Florian Bruhin
68f5ed4fa4 tests: Fix FakeWebTabScroller
Pass tab correctly
2016-07-13 13:47:26 +02:00
Florian Bruhin
f5359b67a2 tests: Fix default_config fixture
This wasn't used since the command tests were deactivated. It was broken
during some refactoring and nobody noticed.
2016-07-13 13:43:46 +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
9c49900f9e QtWebEngine: Add JS logging 2016-07-13 10:55:04 +02:00
Jan Verbeek
bbc46d28ff Use lists instead of tuples for comparing
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +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
1c86669628 Fix test_config.py
We used wrap-search to test interpolations there, but that's gone now.
2016-07-12 17:31:32 +02:00
Daniel Schadt
05c09a1476 tests: fix test_adblock for new download manager 2016-07-12 17:06:40 +02:00
Daniel Schadt
8795f89c88 tests: fix tests for downloads bdd test
The test was failing because of two reasons:

First, the old code had filename questions in DownloadManager.get and
DownloadManager.fetch which were almost identical, thus the part in
DownloadManager.get was removed in an earlier commit. All filename
asking is now done by DownloadManager.fetch. The good part is code
deduplication, the bad part is slightly modified behavior: The new code
doesn't wait for a filename to start the download, instead it tries to
fill the buffer immediately. This made the test fail because qute:// has
no registered handler, so in order for the test to pass now, the "no
crash" part is not enough, we also need to expect the "No handler"
error.

Secondly, and a rather rare (race) condition was the handling of errors
in the DownloadItem. If an error occured after the registration of
self.on_reply_error as error handler and before the check
    reply.error() != QNetworkReply.NoError
at the end of the function, the error signal would be emitted twice:
Once by _die() (called by on_reply_error), and once by the init_reply
function directly (in the last if block). This lead to duplicated error
messages. This is also explained in a comment in the file (with small
"stack traces").
2016-07-12 16:52:01 +02:00
Daniel Schadt
7608805c9a tests: adjust tests for new download mode
Now the prompt is shown with PromptMode.download instead of
PromptMode.text, which we need to change in the tests.
2016-07-12 16:52:01 +02:00
Florian Bruhin
64b32ec87d Remove general -> wrap-search 2016-07-12 16:47:57 +02:00
Florian Bruhin
f0da508c21 Move searching out of WebView subclass
This also makes it work for QtWebEngine.
It also seems to fix #1050 though I'm not 100% sure why.
2016-07-12 16:29:50 +02:00
Florian Bruhin
9f6b3973d3 Adjust :print --pdf test title 2016-07-12 13:29:32 +02:00
Florian Bruhin
77035851a3 Sanity check the PDF file for :print --pdf test 2016-07-12 13:28:43 +02:00
Florian Bruhin
fce825f9df Remove redundant "Given a new tmpdir" step
With the (tmpdir) replacement we'll get a temporary directory no matter
what, so this is unnecessary.
2016-07-12 13:22:47 +02:00
Florian Bruhin
cd4eff364a Add printing to tab API
This fixes printing for QtWebKit, and hopefully will make printing to
PDF work with QtWebEngine with Qt >= 5.7
2016-07-12 12:54:11 +02:00
Florian Bruhin
7a39021d41 Merge branch 'issues/1630' of https://github.com/jdkaplan/qutebrowser into jdkaplan-issues/1630 2016-07-12 10:07:59 +02:00
Florian Bruhin
37c6d63ddf tests: Ignore "load glyph failed" warnings
See #1637
2016-07-12 09:45:40 +02:00
Jeremy Kaplan
6b2b096f3c Add test for :print --pdf 2016-07-11 20:08:24 -04:00
Florian Bruhin
4f9be56d7d Merge branch 'add-bookmark-by-url' of https://github.com/ismail-s/qutebrowser into ismail-s-add-bookmark-by-url 2016-07-11 20:54:09 +02:00
Florian Bruhin
9f9e41687f Add a (tmpdir) replacement for BDD tests
See #1639
2016-07-11 20:47:37 +02:00
Florian Bruhin
d91c922b4c Add --qute-bdd-webengine switch for end2end tests 2016-07-11 17:24:03 +02:00
Florian Bruhin
e80475ed57 Remove support for showing JS statusbar messages
Closes #1579.
2016-07-11 16:19:44 +02:00
Florian Bruhin
f46d6cbe27 Fix url_text, take 3 2016-07-11 15:06:36 +02:00
Florian Bruhin
9b75e661e2 Fix missed url_text substitutions 2016-07-11 14:59:35 +02:00
Florian Bruhin
a470bfc3f3 Get rid of url_text_changed signal
Instead we simply use url_changed which (similar to Qt's urlChanged)
simply has a QUrl argument.
2016-07-11 14:28:51 +02:00
Florian Bruhin
64dc099d51 pylint: Enable docstyle extension 2016-07-11 13:47:18 +02:00
Florian Bruhin
6a07d231f4 pykint: Add some disable=unused-variable 2016-07-11 13:18:31 +02:00