Add a webengine duplicate search test

This commit is contained in:
Jay Kamat 2018-02-23 18:13:10 -05:00
parent f926e7b850
commit 4602afe770
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
2 changed files with 9 additions and 1 deletions

View File

@ -185,7 +185,8 @@ class WebEngineSearch(browsertab.AbstractSearch):
result_cb=None):
# When duplicate searching, don't search again (webkit behavior)
if self.text == text and self.search_displayed:
log.webview.debug("Ignoring duplicate search request")
log.webview.debug("Ignoring duplicate search request"
" for {}".format(text))
return
self.text = text

View File

@ -52,6 +52,13 @@ Feature: Searching on a page
And I wait for "search didn't find blub" in the log
Then the warning "Text 'blub' not found on page!" should be shown
@qtwebkit_skip: Supported by default on qtwebkit
Scenario: Searching text duplicates
When I run :search foo
And I wait for "search found foo" in the log
And I run :search foo
Then "Ignoring duplicate search request for foo" should be logged
## search.ignore_case
Scenario: Searching text with search.ignore_case = always