Commit Graph

1822 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
8e7002db7a Test CompletionFilterModel.count 2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
f19b818b58 Test CompletionFilterModel.set_source_model 2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
b13153aa77 Test CompletionFilterModel.first/last. 2016-08-05 07:20:31 -04:00
Florian Bruhin
0169f3a24f Add _qutebrowser_ prefix for custom JS functions
With QtWebKit or QtWebEngine with Qt < 5.7, the functions end up in the
page's namespace. We can't easily avoid this, but at least we can name
them in a way which reduces conflicts.
2016-08-05 10:31:07 +02:00
Florian Bruhin
2b496a81ef tests: Use parametrize for parse_fatal_stacktrace 2016-08-05 09:01:09 +02:00
Florian Bruhin
029ea2e5a7 Add miscwidgets.WrapperLayout.wrap
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Florian Bruhin
466a87af6a Merge branch 'end2endTest4@844' of https://github.com/nanjekyejoannah/qutebrowser into nanjekyejoannah-end2endTest4@844 2016-08-04 18:21:43 +02:00
Florian Bruhin
74b9b0ba90 Remove unneeded lambda 2016-08-04 18:15:29 +02:00
Florian Bruhin
a8ef956726 Add quotes for strings in javascript.assemble 2016-08-04 17:58:40 +02:00
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
nanjekyejoannah
6431cd2395 added closing body tag 2016-08-04 15:43:58 +03:00
nanjekyejoannah
04b007986f end2end testcase for #844 2016-08-04 13:47:14 +03:00
Daniel Schadt
8730dc6f8e tests: use :hint instead of :hint all download
:hint all download does not use the response headers to determine the
filename (the prompt is shown before a request is even done), so our
long filename was pretty useless.

:hint works because it does a request first and uses the right filename,
but we need to wait until the prompt is shown before we can do
:prompt-open-download, since the request is a bit slower and would fail
otherwise.
2016-08-04 11:16:43 +02:00
Daniel Schadt
b9b3bdf9dd Minor Text Fixes 2016-08-04 11:03:05 +02:00
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