Commit 197e7959 authored by anonym's avatar anonym
Browse files

Make Tor Check work with the simulated Tor network.

In this case, a Tor Check failure is expected.
parent 139c3ace
...@@ -193,3 +193,31 @@ Then /^the file is saved to the default Tor Browser download directory$/ do ...@@ -193,3 +193,31 @@ Then /^the file is saved to the default Tor Browser download directory$/ do
expected_path = "/home/#{LIVE_USER}/Tor Browser/#{@some_file}" expected_path = "/home/#{LIVE_USER}/Tor Browser/#{@some_file}"
try_for(10) { $vm.file_exist?(expected_path) } try_for(10) { $vm.file_exist?(expected_path) }
end 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'
if browser == 'Tor Browser' and not $config["Chutney"]
expected_image = success
else
expected_image = failure
end
else
raise "Unsupported expectation '#{expectation}'"
end
step "I see \"#{expected_image}\" after at most 180 seconds"
end
...@@ -22,8 +22,8 @@ Feature: The Tor enforcement is effective ...@@ -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 Given I have started Tails from DVD and logged in and the network is connected
And I capture all network traffic And I capture all network traffic
When I successfully start the Unsafe Browser When I successfully start the Unsafe Browser
And I open the address "https://check.torproject.org" in the Unsafe Browser And I open Tor Check in the Unsafe Browser
And I see "UnsafeBrowserTorCheckFail.png" after at most 60 seconds And I see Tor Check fail in the Unsafe Browser
Then the firewall leak detector has detected IPv4 TCP leaks Then the firewall leak detector has detected IPv4 TCP leaks
Scenario: Anti test: Detecting IPv4 TCP leaks of TCP DNS lookups with the firewall leak detector Scenario: Anti test: Detecting IPv4 TCP leaks of TCP DNS lookups with the firewall leak detector
......
...@@ -114,16 +114,16 @@ Feature: Browsing the web using the Tor Browser ...@@ -114,16 +114,16 @@ Feature: Browsing the web using the Tor Browser
Given I have started Tails from DVD and logged in and the network is connected Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser When I start the Tor Browser
And the Tor Browser has started and loaded the startup page And the Tor Browser has started and loaded the startup page
And I open the address "https://check.torproject.org" in the Tor Browser And I open Tor Check in the Tor Browser
Then I see "TorBrowserTorCheck.png" after at most 180 seconds Then I see Tor Check give the expected outcome in the Tor Browser
@check_tor_leaks @fragile @check_tor_leaks @fragile
Scenario: The Tor Browser's "New identity" feature works as expected 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 Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser When I start the Tor Browser
And the Tor Browser has started and loaded the startup page And the Tor Browser has started and loaded the startup page
And I open the address "https://check.torproject.org" in the Tor Browser And I open Tor Check in the Tor Browser
Then I see "TorBrowserTorCheck.png" after at most 180 seconds Then I see Tor Check give the expected outcome in the Tor Browser
When I request a new identity using Torbutton When I request a new identity using Torbutton
And I acknowledge Torbutton's New Identity confirmation prompt And I acknowledge Torbutton's New Identity confirmation prompt
Then the Tor Browser loads the startup page Then the Tor Browser loads the startup page
......
...@@ -44,8 +44,8 @@ Feature: Browsing the web using the Unsafe Browser ...@@ -44,8 +44,8 @@ Feature: Browsing the web using the Unsafe Browser
Scenario: Opening check.torproject.org in the Unsafe Browser shows the red onion and a warning message. 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 Given I have started Tails from DVD and logged in and the network is connected
When I successfully start the Unsafe Browser When I successfully start the Unsafe Browser
And I open the address "https://check.torproject.org" in the Unsafe Browser And I open Tor Check in the Unsafe Browser
Then I see "UnsafeBrowserTorCheckFail.png" after at most 60 seconds Then I see Tor Check give the expected outcome in the Unsafe Browser
And the clearnet user has sent packets out to the Internet And the clearnet user has sent packets out to the Internet
@fragile @fragile
......
Supports Markdown
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