Stabilize history tests
Get current URL right away in :view-source, and wait until source is shown in the test.
This commit is contained in:
parent
b687ede25c
commit
38d54cb112
@ -1450,14 +1450,14 @@ class CommandDispatcher:
|
||||
if tab.data.viewing_source:
|
||||
raise cmdexc.CommandError("Already viewing source!")
|
||||
|
||||
try:
|
||||
current_url = self._current_url()
|
||||
except cmdexc.CommandError as e:
|
||||
message.error(str(e))
|
||||
return
|
||||
|
||||
def show_source_cb(source):
|
||||
"""Show source as soon as it's ready."""
|
||||
try:
|
||||
current_url = self._current_url()
|
||||
except cmdexc.CommandError as e:
|
||||
message.error(str(e))
|
||||
return
|
||||
|
||||
lexer = pygments.lexers.HtmlLexer()
|
||||
formatter = pygments.formatters.HtmlFormatter(
|
||||
full=True, linenos='table',
|
||||
|
@ -67,6 +67,7 @@ Feature: Page history
|
||||
Scenario: History with view-source URL
|
||||
When I open data/title.html
|
||||
And I run :view-source
|
||||
And I wait for "Changing title for idx * to 'Source for http://localhost:*/data/title.html'" in the log
|
||||
Then the history file should contain:
|
||||
http://localhost:(port)/data/title.html Test title
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user