tests: Fix redirect-later-continue with timeout

This commit is contained in:
Florian Bruhin 2016-10-05 15:36:25 +02:00
parent f6729d23d2
commit 6be4b74c59
3 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<body onload="console.log('console.log works!')"> <body onload="console.log('[test] test2')">
<p>This page logs a line via console.log</p> <p>This page logs a line via console.log</p>
</body> </body>
</html> </html>

View File

@ -70,7 +70,15 @@ Feature: Using hints
Then the message "Command exited successfully." should be shown Then the message "Command exited successfully." should be shown
@posix @posix
Scenario: Using :hint spawn with flags passed to the command (issue 797) Scenario: Using :hint spawn with flags class Test
log: (args...) ->
console.log "[Foo]", args...
test = new Test()
test.log("Hello World")
passed to the command (issue 797)
When I open data/hints/html/simple.html When I open data/hints/html/simple.html
And I hint with args "--rapid all spawn -v echo -e foo" and follow a And I hint with args "--rapid all spawn -v echo -e foo" and follow a
Then the message "Command exited successfully." should be shown Then the message "Command exited successfully." should be shown

View File

@ -80,8 +80,11 @@ def redirect_later():
@app.route('/custom/redirect-later-continue') @app.route('/custom/redirect-later-continue')
def redirect_later_continue(): def redirect_later_continue():
"""Continue a redirect-later request.""" """Continue a redirect-later request."""
_redirect_later_event.set() if _redirect_later_event is None:
return flask.Response(b'Continued redirect.') return flask.Response(b'Timed out or no redirect pending.')
else:
_redirect_later_event.set()
return flask.Response(b'Continued redirect.')
@app.route('/custom/content-size') @app.route('/custom/content-size')