Commit Graph

121 Commits

Author SHA1 Message Date
Florian Bruhin
7b1bcea306 Bring back separate is_blocked method 2018-12-10 16:33:24 +01:00
Florian Bruhin
007250033a Remove HostBlockerStub 2018-12-10 16:33:24 +01:00
Florian Bruhin
91ae86db62 Merge remote-tracking branch 'origin/pr/3950' 2018-10-08 17:36:10 +02:00
Florian Bruhin
fe910fce49 Speculative fix for test_caret teardown issues 2018-10-07 12:24:05 +02:00
Florian Bruhin
22f2d04ded Fix lint 2018-10-06 19:19:30 +02:00
Florian Bruhin
f63eb8ea15 Avoid showing widgets in tests if unneeded
This avoids odd X errors with test_webenginetab.py, and also makes it run much
faster (0.8s instead of 1.3s).
2018-10-06 19:06:34 +02:00
Florian Bruhin
0858c7146c Get rid of data_display_may_return_none
This got removed in pytest-qt
2018-10-05 18:57:23 +02:00
Florian Bruhin
905863f74e Fix lint 2018-09-27 10:08:50 +02:00
Florian Bruhin
a27a8ada4d Use qtbot.wait_callback 2018-09-26 11:45:45 +02:00
Florian Bruhin
f14b37a3c4 Use os.pardir 2018-09-15 15:48:40 +02:00
Florian Bruhin
9edbcfb828 Share setup between webkit_tab and webengine_tab 2018-09-14 23:42:20 +02:00
Florian Bruhin
d74daf9294 Fix lint 2018-09-14 22:52:40 +02:00
Florian Bruhin
afe16d3a7c Avoid using qapp with autouse=True 2018-09-13 22:49:25 +02:00
Florian Bruhin
b8ab378083 Show web_engine_tab container
This is needed for caret tests on Qt < 5.11
2018-09-08 16:04:29 +02:00
Florian Bruhin
45eece372f Don't access caretElement if it's gone 2018-09-08 15:51:42 +02:00
Florian Bruhin
8c0366f0a7 Configure JS logging for test tab objects 2018-09-08 15:34:28 +02:00
Florian Bruhin
bb5fee4adc Also add a container for webengine_tab
Seems to be needed with Qt < 5.11 for things to work.
2018-09-08 14:52:57 +02:00
Florian Bruhin
9c67239847 Fix lint 2018-09-08 14:52:47 +02:00
Florian Bruhin
7cb32dca07 Add a container around webkit_tab
This makes the selection appear properly in caret tests - otherwise, --no-xvfb
would be needed.
2018-09-08 13:36:02 +02:00
Florian Bruhin
5978605873 Make caret unittests run with QtWebKit 2018-09-08 13:22:17 +02:00
Florian Bruhin
8ac3162425 Call modeman.init() in mode_manager fixture 2018-09-08 12:14:55 +02:00
Florian Bruhin
4ca8fc0cb7 Use a shared web_history fixture 2018-09-06 20:08:32 +02:00
Jay Kamat
8e82adc306
Refactor configcache to cache
Also fix and improve configcache tests
2018-09-05 22:26:12 -07:00
Jay Kamat
d4cf5045ab
Fix tests for configcache 2018-09-02 18:03:36 -07:00
Jimmy
75c6e087c7 Refactor individual tmpdir fixtures.
I was adding a downloads one and saw the opportunity to refactor. Didn't
end up saving that much because I couldn't figure out how to get the
method that does the work to use the fixtures while also taking an
argument, so they have to be passed through from the calling ones. Oh
well.
2018-06-26 16:14:22 +12:00
Florian Bruhin
746c2986f0 Fix test_stylesheet on Qt 5.11 2018-06-14 16:42:24 +02:00
Florian Bruhin
5b5657b0d5 Make sure debug_flags is available for unit tests 2018-06-12 10:38:19 +02:00
Jimmy
b0d1a137da Greasemonkey: Don't attempt scope isolation on webkit
Since the JSCore used by WebKit 602.1 doesn't fully support Proxy and I
can't think of a way to provide isolation otherwise just revert to the
old behaviour in that case. I am checking for the specific WebKit
version because I'm pretty sure that version just happened to be
released when Proxy support was only partially done, any later release
will presumably have a newer JSCore where it works.

There I changed the indentation of a block in the jinja template which
will have inflated the diff.

I added mocking of `objects.backend` to the `webview` and
`webenginewebview` fixtures, I am pretty sure they are mutually
exclusive so don't expect any issues from that.

Because of the feature detection being at template compile time I had to
tweak the test setup to be done via a fixture instead of the setupClass
functionality that I was using before.
2018-05-20 18:42:40 +12:00
Florian Bruhin
d005088b6b Add missing fake_args fixture 2018-05-08 11:26:45 +02:00
Florian Bruhin
1162e640c5 Remove unused imports 2018-03-19 19:42:56 +01:00
Florian Bruhin
460bd86579 Initial attempt at using the tab API for tests/unit/javascript 2018-03-19 18:18:21 +01:00
Florian Bruhin
c03ef10d54 tests: Add a yaml_config_stub fixture 2018-03-12 07:39:20 +01:00
Florian Bruhin
8c0bca90d3 Merge remote-tracking branch 'origin/pr/3456' 2018-03-06 09:32:39 +01:00
Florian Bruhin
f85e69ec77 Refactor other keyinput tests 2018-03-04 20:21:58 +01:00
Jimmy
7dab8335e2 Greasemonkey: handle downloads that complete fast
When `@require`ing local files (with the `file://` scheme) the
greasemonkey manager was not catching the DownloadItem.finished signal
because it was being emitted before it had managed to connect.

I didn't see this happening while testing with files that should have
been in cache but I wouldn't be surprised.

I had to change the download mock to be able to give it the appearance
of asynchronicity. Now when using it one must set download.successful
appropriately before firing download.finished. I also added a list of
downloads to the stub so a test could enumerate them in case the
unit-under-test didn't have a reference to them.
2018-03-03 15:02:43 +13:00
Jimmy
fa1ac8d93c Move download_stub to helpers/fixtures
I am adding support for downloading dependant assets in
browser/greasemonkey and want to mock the download manager for testing.
2018-03-03 15:02:42 +13:00
Florian Bruhin
d3e8d46593 Use a real YamlConfig for tests 2018-02-19 22:08:42 +01:00
Florian Bruhin
6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
Florian Bruhin
e76732693c Fix wrong import order 2017-12-15 14:35:07 +01:00
Florian Bruhin
7520a365eb Update comments 2017-11-26 19:43:49 +01:00
Ryan Farley
650b0051e6 remove useless ignores 2017-11-26 01:59:21 -06:00
Ryan Farley
5ed8019115 update flake8 and flake8-deprecated
Updated requirements and adjusted the configuration in `.flake8`; other
files have been modified where the lack of per-file auto-ignore caused
problems, where putty's `# flake8: disable=` syntax could be replaced
with a simpler `noqa`, or where pylint directives already suppressed the
same error.
2017-11-26 00:16:14 -06:00
Florian Bruhin
a451e8ac9d Add a cache_tmpdir fixture 2017-11-21 14:09:30 +01:00
Florian Bruhin
203233c894 Track the view correctly in the webengineview fixture
This makes sure the view is closed after the test (fixing test_none on AppVeyor)
and also makes sure we have a QApplication.
2017-11-20 20:47:40 +01:00
Jay Kamat
5913552dfe
Fix style issues in stylesheet tests 2017-11-13 19:57:11 -05:00
Jay Kamat
d39dda38ce
Refactor CallbackChecker into test utils 2017-11-10 12:27:00 -05:00
Jay Kamat
e7fdff5632
Implement basic stylesheet tests 2017-11-09 14:44:32 -05:00
siddhugolu
4862b2faf9 modified pylint pragmas 2017-10-22 23:52:35 +05:30
Michael Hoang
249e497d36 Add test for window completion 2017-10-11 17:18:13 +11:00
Florian Bruhin
2a4f10f0f5 Add qapp for tabbed_browser_stubs 2017-09-20 11:30:18 +02:00