Commit e500661b authored by anonym's avatar anonym
Browse files

Drop the usage of Tor Check in our tests.

It doesn't make sense now when we use Chutney since that always means
it will report that Tor is not being used.

In some scenarios we used it simply because we needed *some* page
(distinct from the Tails News page) and we had the image. In those
cases we now use the Tails homepage instead. I tried to use dogtail,
but realized that dogtail won't work for the Unsafe Browser due to
parent a1e76036
......@@ -113,6 +113,28 @@ When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
end
end
# This step is limited to the Tor Browser due to #7502 since dogtail
# uses the same interface.
Then /^a page titled "([^"]+)" has loaded in the Tor Browser$/ do |title|
expected_title = "#{title} - Tor Browser"
app = Dogtail::Application.new('Firefox')
app.child(expected_title, roleName: 'frame').wait(60)
# The 'Stop loading this page' button (graphically shown as an X) is
# only shown while a page is loading, so once we see the expected
# title *and* this one has disappeared, then we can be sure that the
# page has fully loaded.
try_for(60) do
assert_raise do
app.child(
'Location',
roleName: 'push button',
description: 'Stop loading this page',
retry: False
)
end
end
end
Then /^the (.*) has no plugins installed$/ do |browser|
step "I open the address \"about:plugins\" in the #{browser}"
step "I see \"TorBrowserNoPlugins.png\" after at most 30 seconds"
......@@ -194,27 +216,15 @@ Then /^the file is saved to the default Tor Browser download directory$/ do
try_for(10) { $vm.file_exist?(expected_path) }
end
When /^I open Tor Check in the (.+)$/ do |browser|
step "I open the address \"https://check.torproject.org\" in the #{browser}"
end
Then /^I see Tor Check (.+) in the (.+)$/ do |expectation, browser|
assert(['Tor Browser', 'Unsafe Browser'].include?(browser),
"This step does not support the '#{browser}'")
success = 'TorBrowserTorCheck.png'
failure = 'UnsafeBrowserTorCheckFail.png'
case expectation
when 'succeed'
assert_equal('Tor Browser', browser,
'Only the Tor Browser can pass Tor Check')
expected_image = success
when 'fail'
expected_image = failure
when 'give the expected outcome'
# Since we use Chutney, failure is expected
expected_image = failure
else
raise "Unsupported expectation '#{expectation}'"
end
step "I see \"#{expected_image}\" after at most 180 seconds"
When /^I open Tails homepage in the (.+)$/ do |browser|
step "I open the address \"https://tails.boum.org\" in the #{browser}"
end
Then /^Tails homepage loads in the Tor Browser$/ do
title = 'Tails - Privacy for anyone anywhere'
step "a page titled \"#{title}\" has loaded in the Tor Browser"
end
Then /^Tails homepage loads in the Unsafe Browser$/ do
@screen.wait('TailsHomepage.png', 60)
end
......@@ -140,9 +140,9 @@ Then /^I cannot configure the Unsafe Browser to use any local proxies$/ do
@screen.waitVanish('UnsafeBrowserProxySettingsWindow.png', 10)
# Test that the proxy settings work as they should
step "I open the address \"https://check.torproject.org\" in the Unsafe Browser"
step 'I open Tails homepage in the Unsafe Browser'
if proxy_type == no_proxy
@screen.wait('UnsafeBrowserTorCheckFail.png', 60)
step 'Tails homepage loads in the Unsafe Browser'
else
@screen.wait('UnsafeBrowserProxyRefused.png', 60)
end
......
......@@ -22,8 +22,8 @@ Feature: The Tor enforcement is effective
Given I have started Tails from DVD and logged in and the network is connected
And I capture all network traffic
When I successfully start the Unsafe Browser
And I open Tor Check in the Unsafe Browser
And I see Tor Check fail in the Unsafe Browser
And I open Tails homepage in the Unsafe Browser
And Tails homepage loads in the Unsafe Browser
Then the firewall leak detector has detected leaks
Scenario: Anti test: Detecting TCP leaks of DNS lookups with the firewall leak detector
......
......@@ -109,21 +109,13 @@ Feature: Browsing the web using the Tor Browser
And the Tor Browser has started
Then the Tor Browser uses all expected TBB shared libraries
@check_tor_leaks @fragile
Scenario: Opening check.torproject.org in the Tor Browser shows the green onion and the congratulations message
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 has started and loaded the startup page
And I open Tor Check in the Tor Browser
Then I see Tor Check give the expected outcome in the Tor Browser
@check_tor_leaks @fragile
Scenario: The Tor Browser's "New identity" feature works as expected
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 has started and loaded the startup page
And I open Tor Check in the Tor Browser
Then I see Tor Check give the expected outcome in the Tor Browser
And I open Tails homepage in the Tor Browser
Then Tails homepage loads in the Tor Browser
When I request a new identity using Torbutton
And I acknowledge Torbutton's New Identity confirmation prompt
Then the Tor Browser loads the startup page
......
......@@ -40,14 +40,6 @@ Feature: Browsing the web using the Unsafe Browser
And I start the Unsafe Browser
Then I see a warning about another instance already running
@fragile
Scenario: Opening check.torproject.org in the Unsafe Browser shows the red onion and a warning message.
Given I have started Tails from DVD and logged in and the network is connected
When I successfully start the Unsafe Browser
And I open Tor Check in the Unsafe Browser
Then I see Tor Check give the expected outcome in the Unsafe Browser
And the clearnet user has sent packets out to the Internet
@fragile
Scenario: The Unsafe Browser cannot be configured to use Tor and other local proxies.
Given I have started Tails from DVD and logged in and the network is connected
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment