From f255a4ede6ab285287556e39e358110e513132b1 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 6 Jul 2018 10:32:16 +0000 Subject: [PATCH] Test suite: add some retry_tor magics to the WebM in Tor Browser scenario. I've tried bumping the number of vCPUs to 4, giving the VM under test more RAM, and it's still very unreliable for me. The Journal says: Jul 06 08:54:49 amnesia tor-browser.desktop[8445]: [Child 8706, MediaPlayback #1] WARNING: Decoder=72da91792200 state=DECODING_METADATA Decode metadata failed, shutting down decoder: file /var/tmp/build/firefox-a0efd2fcd6e9/dom/media/MediaDecoderStateMachine.cpp, line 379 Jul 06 08:54:49 amnesia tor-browser.desktop[8445]: [Child 8706, MediaPlayback #1] WARNING: Decoder=72da91792200 Decode error: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006): file /var/tmp/build/firefox-a0efd2fcd6e9/dom/media/MediaDecoderStateMachine.cpp, line 3445 The previous step passes fine so it's not a matter of connecting to our website, so I have some doubt this change will help for this specific problem, but well, it's a good thing anyway. --- features/step_definitions/browser.rb | 17 +++++++++++++++++ features/torified_browsing.feature | 3 +-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/features/step_definitions/browser.rb b/features/step_definitions/browser.rb index ca9759a802..f47b342ec5 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 25a67c0e52..f46837dc0c 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 -- GitLab