diff --git a/features/step_definitions/browser.rb b/features/step_definitions/browser.rb index ca9759a802bcc8a89ab27297a638cd26b9a067c6..f47b342ec575b9abad25caa8703ac90cdd473436 100644 --- a/features/step_definitions/browser.rb +++ b/features/step_definitions/browser.rb @@ -218,3 +218,20 @@ Then /^the Tor Browser shows the "([^"]+)" error$/ do |error| found = headers.any? { |heading| heading.text == error } raise "Could not find the '#{error}' error in the Tor Browser" unless found end + +Then /^I can watch a WebM video in Tor Browser$/ do + test_url = 'https://tails.boum.org/lib/test_suite/test.webm' + info = xul_application_info('Tor Browser') + open_webm_url = Proc.new do + step "I open the address \"#{test_url}\" in the Tor Browser" + end + recovery_on_failure = Proc.new do + @screen.type(Sikuli::Key.ESC) + @screen.waitVanish(info[:browser_reload_button_image], 3) + open_webm_url.call + end + open_webm_url.call + retry_tor(recovery_on_failure) do + @screen.wait("TorBrowserSampleRemoteWebMVideoFrame.png", 30) + end +end diff --git a/features/torified_browsing.feature b/features/torified_browsing.feature index 25a67c0e524695fc8aca8708df8b3a9e477824aa..f46837dc0c7cd33844dfa091022e64587b10619c 100644 --- a/features/torified_browsing.feature +++ b/features/torified_browsing.feature @@ -55,8 +55,7 @@ Feature: Browsing the web using the Tor Browser Given I have started Tails from DVD and logged in and the network is connected When I start the Tor Browser And the Tor Browser loads the startup page - And I open the address "https://tails.boum.org/lib/test_suite/test.webm" in the Tor Browser - Then I see "TorBrowserSampleRemoteWebMVideoFrame.png" after at most 180 seconds + Then I can watch a WebM video in Tor Browser #11592 @fragile