Florian Bruhin
b791095324
Rename browser.tab module and classes
2016-07-10 17:27:02 +02:00
Florian Bruhin
2649418c0b
Fix lint
2016-07-10 17:04:26 +02:00
Florian Bruhin
fd8e66136f
tests: Add a mode_manager fixture
2016-07-10 17:04:25 +02:00
Florian Bruhin
52e14950f1
tests: Fix messagemock with stack argument
2016-07-10 17:04:25 +02:00
Florian Bruhin
2136d00aa2
tests: Add a fake_args fixture
2016-07-10 17:04:25 +02:00
Florian Bruhin
e36123735b
Use a fixture for FakeWebTab
...
We need to make sure qapp and tab_registry are available everywhere the
FakeWebTab class is used.
2016-07-10 16:57:02 +02:00
Florian Bruhin
782561462b
Use stubs.FakeWebTab to fake tabs
...
This also fixes the cur_url access.
2016-07-08 10:09:03 +02:00
Florian Bruhin
09f025628f
Use tab.AbstractTab for signals/slots
2016-07-07 18:32:52 +02:00
Florian Bruhin
17466b4f26
Fix some lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
4e5a7a891e
tests: Use FakeWebTab for stubbing
2016-07-07 18:32:52 +02:00
Florian Bruhin
115021b8ea
Get QtWebEngine to start and work somewhat
2016-07-07 18:32:52 +02:00
Florian Bruhin
ebf9bc4e0a
Improve version output
2016-07-06 23:47:59 +02:00
Ryan Roden-Corrent
68e373df44
Use QLineEdit as a base for FakeStatusbarCommand.
...
Reduces the amount of mocking and keeps it more true to the original.
2016-07-03 23:06:36 -04:00
Ryan Roden-Corrent
7f690c3f3f
More unit test coverage for Completer.
...
Test completion_item{next,prev} and change_completed_part.
2016-07-03 22:58:09 -04:00
Ryan Roden-Corrent
13e8ed53d6
Clean up completer unit test.
...
Based on code review:
- import modules, not classes
- use methods, not lambdas for the mock command prompt class
- use None rather than Mock for DUMB_SORT
- autouse two fixtures and remove them from test signatures
2016-07-03 17:18:16 -04:00
Ryan Roden-Corrent
07edcce697
Unit test Completer.update_completion.
...
Validate update_completion sets the completions widget's model
correctly based on the command text.
2016-07-02 12:25:55 -04:00
Ryan Roden-Corrent
d45acb0388
Eliminate FakeSettingSection/Value.
...
Don't really need to mock these out for tests as the real classes are
simple enough.
2016-06-30 20:12:44 -04:00
Ryan Roden-Corrent
ee59b133c0
Don't bother mocking a history entry.
...
Use webkit.history.Entry in tests instead of FakeHistoryEntry.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
f50b8bb8e8
Use iter instead of __iter__.
...
Corrent two places this was used.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
d6012ad95c
Test delete_cur_item more cleanly.
...
Reduce duplicate code by mocking out a QTreeView around the model and
setting its index.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
9d49f5a57d
Test tab completion with multiple tabbed browsers.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
b6652ad6bc
Test completion quickmark/bookmark deletion.
...
Validate that quickmarks and bookmarks can be deleted from the url
completion menu.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
409de10fb4
Unit test delete_cur_item for tab completion model.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
8321c1a90f
Unit test setting value completion
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
f5b1019d4d
Unit test config option completion.
...
Had to add the `raw` parameter to ConfigStub.get as the setting option
completion model passes this argument explicitly (although the docs say
only raw=True is supported).
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
16f043034f
Unit test tab (buffer) completion.
...
This involved adding a few stubs as well as expanding the FakeWebView.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
610f9b7068
Unit test session completion
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
baf8d00a20
Unit test url/quickmark/bookmark completion.
...
This also adds a few more stubs/fakes to mock out the
quickmark-manager, bookmark-manager, and web-history objects.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
b037ec489f
Add unit tests for help completion.
...
Also adds a FakeConfigSection stub for stubbing out configdata.DATA.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
555bdb75b5
Add unit test for CommandCompletionModel.
...
This establishes a pattern that can probably be used to test any of the
completion models.
See #999 .
2016-06-30 07:26:02 -04:00
Florian Bruhin
4fccc89d7d
Split browser into browser/browser.webkit
2016-06-13 11:18:21 +02:00
Daryl Finlay
054e9ab439
Add host placeholder to window and tab title formats
2016-06-10 21:59:43 +01:00
Florian Bruhin
33f01d8375
Fix lint
2016-06-09 21:14:03 +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
483a5f8103
Fix sharing of cookie jars with private browsing
...
Fixes #1219
2016-06-08 16:35:43 +02:00
Florian Bruhin
520572321a
Add unittests for partial command parsing
2016-06-06 16:18:49 +02:00
Florian Bruhin
10630e30ab
hints: Integrate _get_first_rectangle into webelem
2016-06-06 11:56:15 +02:00
Florian Bruhin
64d4c9f83e
Clean up end2end test file structure
...
This renames tests/integration to tests/end2end and moves some files to
tests/end2end/fixtures.
2016-05-29 18:20:00 +02:00
Ryan Roden-Corrent
581a521b4d
Allow setting mock keybindings for unit tests.
...
Implement mock_key_config.set_bindings_for to set bindings that will be
retrieved by mock_key_config.get_bindings_for.
This is useful for testing the new keyhint ui.
2016-05-15 22:18:16 -04:00
Florian Bruhin
2a343cb3a1
Various code style improvements
2016-04-27 20:25:27 +02:00
Florian Bruhin
e53c136342
tests: Refactor partial_compare
...
Functions now return a PartialCompareOutcome to attach an error message instead
of a bool, and the main function got rewritten based on a handler dict.
2016-04-21 00:14:13 +02:00
Florian Bruhin
5a5e8167dd
Fix lint
2016-03-29 23:20:39 +02:00
Florian Bruhin
4067d38cb0
Add some tests for QtWebKit/Engine JS capabilities
2016-03-29 22:08:49 +02:00
Philipp Hansch
e0e8bc805b
Remove unneeded argument
...
Instead, figure out the data directory from the helpers directory.
2016-03-29 19:52:46 +02:00
Philipp Hansch
e9ae2156d3
Comply with flake8
2016-03-29 00:08:14 +02:00
Philipp Hansch
5811a25299
Add a datapath replacement for spawning userscripts
...
This adds a `(datapath)` replacement for feature tests.
`(datapath)` will expand to the absolute path to the integration data
directory.
2016-03-28 23:48:37 +02:00
Florian Bruhin
83dc390808
tests: Move fixtures into a separate file.
2016-02-04 07:27:23 +01:00
Florian Bruhin
526441bcae
Fix new flake8 lint.
...
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00