Commit Graph

2777 Commits

Author SHA1 Message Date
Jay Kamat
a3d41c0467
Refactor search method of AbstractBrowserTab into a field 2017-05-09 00:24:13 -07:00
Jay Kamat
02f79c2990
Add tests for manual selection 2017-05-09 00:11:25 -07:00
Jay Kamat
5ba81e3611
Add tests for follow_selected 2017-05-08 22:32:53 -07:00
Florian Bruhin
8052249b1b Make check_coverage.py work with coverage 4.4
With coverage 4.4, the source name (qutebrowser/) is not added to the filename
anymore. To adjust for that, we remove qutebrowser/ from all paths, and also
make sure to remove it from what coverage returns (in case someone is running an
older version).
2017-05-09 06:13:35 +02:00
Florian Bruhin
789aebd742 Merge commit '120379dd217d8daaa6b48cb21c8cb3de7679bbec' into rcorre/benchmark_history 2017-05-03 23:15:36 +02:00
Florian Bruhin
90b0af97ce Improve serialization crash check
It now works correctly with view-source URLs and is disabled on Qt 5.9.

Fixes #2289
See #2458
2017-05-03 23:15:17 +02:00
Florian Bruhin
ea2d5e97e2 Disable serialization crash check on Qt 5.9 2017-05-03 21:31:09 +02:00
Ryan Roden-Corrent
120379dd21 Benchmark url completion.
This benchmark simulates what I expect to be the most common use-case for url
completion: opening completion and entering several letters.
2017-05-03 07:43:02 -04:00
Florian Bruhin
7c6981e512 Remove unused imports 2017-05-02 10:41:51 +02:00
Florian Bruhin
d5c5d09b18 Hopefully stabilize test_version
When using QuteProcess here, we fight with it over who can read the output.
Just use a raw QProcess instead.
2017-05-02 09:12:06 +02:00
Florian Bruhin
7b4ab901e9 tests: Fix Chromium message matching 2017-05-02 08:24:57 +02:00
Florian Bruhin
bffdea6719 Read qWebKitVersion in qtutils.is_webkit_ng.
This means we need to try and import qWebKitVersion in qtutils, but better there
than at every place which calls it.
2017-04-28 21:36:02 +02:00
Florian Bruhin
8101fe99a8 Fix starting with Python 2
Fixes #2567
2017-04-28 20:51:38 +02:00
Florian Bruhin
421aa0d319 Also try harder to get text content 2017-04-28 19:11:02 +02:00
Florian Bruhin
c8090b5388 Don't wait for click message in webelem tests
Looks like we get this sometimes:

----> Waiting for 'Clicked non-editable element!' in the log
14:02:14.976 DEBUG    webview    webkittab:find_at_pos:618 Hit test result element is null!
14:02:14.976 DEBUG    mouse      mouse:_mousepress_insertmode_cb:149 Got None element, scheduling check on mouse release
14:02:14.977 DEBUG    mouse      webview:mousePressEvent:299 Normal click, setting normal target
14:02:14.978 DEBUG    mouse      mouse:mouserelease_insertmode_cb:173 Element vanished!
2017-04-28 17:29:19 +02:00
Florian Bruhin
20da495376 Add missing file 2017-04-28 15:22:29 +02:00
Florian Bruhin
a2c8e093f4 Move webelement checks to javascript.feature 2017-04-28 15:16:36 +02:00
Florian Bruhin
6458c692cb Improve JS value type checks 2017-04-28 15:15:32 +02:00
Florian Bruhin
0c653c4703 Handle elem.className in webelem.js 2017-04-28 14:48:30 +02:00
Florian Bruhin
513f83d446 Try harder to get tag name from element
This could happen for any of the attributes, but for tagName this actually
happens in the wild... Since elem.tagName is equal to elem.nodeName we just try
to use this.

Fixes #2569
2017-04-28 14:48:30 +02:00
Florian Bruhin
d8bfa6d6b7 Merge commit '6549fd84ce461d3098c13818219df4e4bfd6b444' 2017-04-27 21:15:09 +02:00
Florian Bruhin
d62ebdb926 Make most of search BDD tests work with QtWebEngine 2017-04-27 21:02:26 +02:00
Florian Bruhin
4cd977cab6 Fix zero handling in qflags_key 2017-04-27 20:14:51 +02:00
Niklas Haas
6549fd84ce
Add tabs->favicon-scale setting
This allows users to change the size of the favicon independently from
the size of the font/tab, in order to adjust the balance between
favicons and text. The drawing code is also adjusted to place the icon
relative to the text center, rather than the text top.

Works as expected even for values of 0.0 (which is equivalent to hiding
the favicon completely).

Closes #2549.
2017-04-27 08:53:51 +02:00
Florian Bruhin
046401c489 Clean up search.feature 2017-04-27 08:20:55 +02:00
Florian Bruhin
11c026bf4c Reenable QtWebKit cache with Qt 5.9.
This was fixed here:
https://codereview.qt-project.org/#/c/190818/

See #2427
2017-04-24 12:27:00 +02:00
Florian Bruhin
1539301d64 Fix test coverage for statusbar.url 2017-04-24 08:41:29 +02:00
Florian Bruhin
52f31ed15c Rename urlutils.safe_display_url to safe_display_string 2017-04-24 07:49:12 +02:00
Florian Bruhin
b632fe3285 Fix invalid URL handling in statusbar 2017-04-24 07:47:58 +02:00
Florian Bruhin
195d0ea207 Show Punycode URL for IDN pages in addition to decoded one
This helps when Unicode homographs are used for phishing purposes.
Fixes #2547
2017-04-24 06:58:41 +02:00
Florian Bruhin
a1de313aa3 Add qapp to test_proxy_from_url_pac 2017-04-23 23:10:29 +02:00
Ryan Roden-Corrent
6151b43c47 Fix qute_history benchmark.
This benchmark was running very quickly due to an improper setup.
The current history implementation expects that a newly inserted entry must
be more recent than any existing entries and sorts according to this
assumption.

The benchmark test inserts increasingly older entries, breaking this invariant.
When run in the benchmark, the qute://history/data implementation would
see an entry older than the oldest time in the time window and would
immediately return with a single "next" entry.

This patch inserts data in an order that mantains history's invariant and adds
a sanity-check at the end of the test. It does not check for the exact length
as not all entries will be within the time window. The length will be some
values <= 100000, the check just ensures that there is at least something more
than a "next" entry.

Before:
---------------------------------------------- benchmark: 1 tests ----------------------------------------------
Name (time in us)                  Min      Max    Mean  StdDev  Median     IQR  Outliers(*)  Rounds  Iterations
----------------------------------------------------------------------------------------------------------------
test_qute_history_benchmark     9.3050  21.9250  9.6143  0.2454  9.5880  0.1070      230;360    9930           1
----------------------------------------------------------------------------------------------------------------

After:
-------------------------------------------------- benchmark: 1 tests -------------------------------------------------
Name (time in ms)                    Min       Max      Mean  StdDev    Median     IQR  Outliers(*)  Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------
test_qute_history_benchmark     220.7040  223.1900  221.7536  1.1070  221.1939  1.8803          1;0       5           1
-----------------------------------------------------------------------------------------------------------------------
2017-04-17 12:15:49 -04:00
Florian Bruhin
db8b6d3e68 Add test for QNetworkReply.abort 2017-04-17 16:02:57 +02:00
Florian Bruhin
ad9e82b91e Adjust bookmark tests 2017-04-16 21:13:01 +02:00
Florian Bruhin
1d0f187fab Adjustments for new pylint version 2017-04-13 18:22:16 +02:00
Florian Bruhin
4a480e6f5f Ignore Chromium NETLINK message 2017-04-12 13:24:10 +02:00
Fritz Reichwald
68c655bd9c Add period at end of docstring to make flake happy 2017-04-12 10:21:03 +02:00
Fritz Reichwald
b00c1dc906 Add docstring 2017-04-12 09:23:29 +02:00
Fritz Reichwald
ff767dd965 Add neccessary metadata to py script 2017-04-12 08:47:39 +02:00
Fritz Reichwald
c38dc95c23 Add posix to stdin test beacause the py script fails on windows 2017-04-12 07:59:40 +02:00
Fritz Reichwald
b784ddeddd Also test stdin close for detached start 2017-04-12 07:40:11 +02:00
Fritz Reichwald
590a9b4f78 Indent with spaces and minor changes 2017-04-12 07:32:40 +02:00
Fritz Reichwald
424d0aec5a change test_stdinclose.py to stdinclose.py 2017-04-12 07:31:24 +02:00
Fritz Reichwald
75f8d2a1d1 Test if stdin gets closed when starting QProcess 2017-04-12 06:54:39 +02:00
Florian Bruhin
fc37223d1b Regenerate docs properly for qute:help test 2017-04-09 11:36:13 +02:00
Florian Bruhin
778832a813 Set path when redirecting qute:* URLs
Fixes #2513
2017-04-08 23:04:10 +02:00
Florian Bruhin
28e6158a04 Stabilize some tests with Qt 5.9 QtWebEngine 2017-04-08 20:38:23 +02:00
Florian Bruhin
6051f93c02 Avoid checking for scroll position in macro tests
This makes them simpler and more stable.
2017-04-08 19:54:30 +02:00
Florian Bruhin
e23318fe91 Mark failing test as flaky on QtWebEngine
It consistently fails on Qt 5.9 now while waiting the page to be scrolled to
0/20, but I can't figure out why that is happening.

See #2514, #2410
2017-04-08 19:29:46 +02:00
Florian Bruhin
a081d4184d tests: Adjust percent-encoding tests for Qt 5.9 changes
See #2514
2017-04-08 19:25:55 +02:00