Commit Graph

8435 Commits

Author SHA1 Message Date
Florian Bruhin
66aae2e5ce Revert "travis: Reactivate OS X tests"
This reverts commit af798c7450.

Currently installing Qt is broken because 5.6.1 was released
2016-06-10 13:48:17 +02:00
Florian Bruhin
e0acda403f Add an end-to-end test for :history-clear 2016-06-10 13:20:58 +02:00
Florian Bruhin
a0fd096038 Update CONTRIBUTING 2016-06-10 13:11:53 +02:00
Florian Bruhin
0a25bb508a Fix lint 2016-06-10 12:21:48 +02:00
Florian Bruhin
9298fa697b Allow to pass atime to WebHistory.add_url
This makes a lot of tests easier and/or more exact.
2016-06-10 12:12:29 +02:00
Florian Bruhin
7511bc1fe5 tests: 100% coverage for browser.history 2016-06-10 12:01:14 +02:00
Florian Bruhin
14a04f1535 Fix lint 2016-06-09 22:03:35 +02:00
Florian Bruhin
185b4bc18b Add more tests for browser.history 2016-06-09 21:14:04 +02:00
Florian Bruhin
f691439149 Make WebHistory parent optional 2016-06-09 21:14:04 +02:00
Florian Bruhin
1d1c71f919 Strip of trailing spaces for history entries 2016-06-09 21:14:04 +02:00
Florian Bruhin
b8fba0a138 Add some documentation to WebHistory 2016-06-09 21:14:04 +02:00
Florian Bruhin
e9e6da6510 Remove WebHistory.__getitem__ 2016-06-09 21:14:04 +02:00
Florian Bruhin
d3dd6d2f77 Add hypothesis test for history.Entry.from_str 2016-06-09 21:14:04 +02:00
Florian Bruhin
33f01d8375 Fix lint 2016-06-09 21:14:03 +02:00
Florian Bruhin
d5abfa3d0d Check if original URL is valid 2016-06-09 21:14:03 +02:00
Florian Bruhin
9510af9912 Use QUrl with QWebHistory
Now that we have our own history implementation, we get the URLs as QUrl
and not as string - so no point in converting them to string and back.
2016-06-09 21:14:03 +02:00
Florian Bruhin
5f25ce69ec Add some tests for browser.history 2016-06-09 21:14:03 +02:00
Florian Bruhin
6304565a9a Refactor browser.history
- Rename HistoryEntry to Entry
- Move history line parsing from WebHistory.async_read to Entry.from_str
- Improve errors for invalid history lines
- Pass history directory/filename from the outside to WebHistory
- Clear temp history after reading it when async_read is done
2016-06-09 21:14:00 +02:00
Florian Bruhin
446abefba5 Make sure there is no temp history without datadir 2016-06-09 17:44:04 +02:00
Florian Bruhin
789b9c9308 tests: Yield fake_save_manager from fixture 2016-06-09 17:44:04 +02:00
Florian Bruhin
75669dd21b tests: Move fake_save_manager to helper.fixtures 2016-06-09 17:44:04 +02:00
Florian Bruhin
ef2b3cd6d9 tests.helpers: Clean up imports 2016-06-09 17:44:04 +02:00
Florian Bruhin
346e59880e Add a manual test for visited history 2016-06-09 17:44:04 +02:00
Florian Bruhin
34ba44b0a3 Separate WebHistoryInterface from WebHistory 2016-06-09 17:44:04 +02:00
Florian Bruhin
089131c79d Improve error message when clicking invalid link 2016-06-09 17:43:33 +02:00
Florian Bruhin
86632804a9 behaviour -> behavior for consistency 2016-06-09 17:30:14 +02:00
Florian Bruhin
726ae50251 Clean up find-implementation in test_hints_html 2016-06-09 17:16:00 +02:00
Florian Bruhin
dbbc4b72ed Use quteproc.set_setting in test_hints_html 2016-06-09 17:15:34 +02:00
Florian Bruhin
ab8a2f7147 Fix lint 2016-06-09 17:12:23 +02:00
Florian Bruhin
035526848e Add a hints -> find-implementation setting
This makes it possible to switch to an alternative implementation if
there are weird issues like #1568. Some users might also prefer the
slightly better performance over more accurate hints.
2016-06-09 17:00:08 +02:00
Florian Bruhin
2d54c927e3 Fix urlutils tests on Qt 5.6.1
For some reason the behaviour of QHostAddress("31c3").isValid() changed
with Qt 5.6.1: https://bugreports.qt.io/browse/QTBUG-53983

This causes the test to fail because Qt thinks this is a valid IP, so we
think it's a valid URL.
2016-06-09 15:16:49 +02:00
Florian Bruhin
c390c797b2 tests: Ignore QtWebKit image format warning
In "Cancelling a MHTML download (issue 1535)" (downloads.feature) we
load an invalid page as a fake "image". With Qt 5.6.1, we get this
warning then.
2016-06-09 14:48:38 +02:00
Florian Bruhin
9e1d20017c tests: Mark "History with an error" as flaky
For some reason, sometimes on Travis the history file we read is empty.
I have no idea why though, as we successfully wait until ":save saved
history" is logged, and that is working fine.

Let's just mark the test as flaky for now so we can move on.
2016-06-09 11:17:18 +02:00
Florian Bruhin
288744c8d0 Use BDD test for link with spaces issue
Clicking actually works fine without the strip() as _resolve_url is
never called in that case, so we need to do something which actually
needs the URL as well.
2016-06-09 10:50:08 +02:00
Florian Bruhin
10918d2a3a Update docs 2016-06-09 10:50:08 +02:00
Florian Bruhin
281d2a427b Merge branch 'stripurl' of https://github.com/Konubinix/qutebrowser into Konubinix-stripurl 2016-06-09 10:38:35 +02:00
Florian Bruhin
aae205030c Add missing import 2016-06-09 10:29:16 +02:00
Florian Bruhin
d6926f0622 Fix expected data in AppendLineParser test
There were two different issues here:

- `\n` rather than `os.linesep` was used, which caused the "generated"
  file to have less data in it than expected
- A final `os.linesep` (or `\n`) was missing, but that was cancelled out
  by a off-by-one error when slicing, so wasn't an issue until we tried
  with \r\n endings.
2016-06-09 10:26:09 +02:00
Samuel Loury
a69610077e Add a test about a href with spaces around 2016-06-09 08:36:18 +02:00
Samuel Loury
8369140b72 Strip the url before processing it
This won't hurt and will help with some poorly formatted sites
including blank spaces around the url (e.g. the Previous link in a
dashboard make with CDash 2.0.2).
2016-06-09 08:23:53 +02:00
Florian Bruhin
c5c022226f Merge branch 'EliteTK-lowercase-toggle' 2016-06-08 22:40:05 +02:00
Florian Bruhin
5563552c13 Update docs 2016-06-08 22:39:54 +02:00
Florian Bruhin
4fe6935003 Merge branch 'lowercase-toggle' of https://github.com/EliteTK/qutebrowser into EliteTK-lowercase-toggle 2016-06-08 22:39:19 +02:00
Florian Bruhin
01a622bf02 history tests: Sync with :save better 2016-06-08 22:32:39 +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
Tomasz Kramkowski
a98cd9a528 Change relevant tests to work with new toggle behaviour 2016-06-08 19:37:13 +01:00
Tomasz Kramkowski
573c25073d Fix toggle config using capitalised boolean value. 2016-06-08 19:06:00 +01:00
Florian Bruhin
e08c6cb059 Don't save the original URL for redirected pages
See #1345
2016-06-08 17:15:08 +02:00
Florian Bruhin
263b5680c7 Improve :history-clear docstring 2016-06-08 16:49:07 +02:00
Florian Bruhin
483a5f8103 Fix sharing of cookie jars with private browsing
Fixes #1219
2016-06-08 16:35:43 +02:00