Commit 1d27515e authored by anonym's avatar anonym
Browse files

Test that the Tor Browser cannot access LAN resources.

Since no HTTP server is listening on the LAN resource the Tor Browser
would show the same "Unable to connect" error message even if the
request wasn't blocked. We should be fine, though, since we check the
captured traffic. The picture is more of a signal saying that "now the
network traffic would have been generated *if* the request isn't
blocked" which we use to know when to check the network capture.
parent c5588b32
When /^I open some LAN resource in the Tor Browser$/ do
next if @skip_steps_while_restoring_background
@lan_host = ""
step "I open the address \"#{@lan_host}\" in the Tor Browser"
When /^no traffic has flowed to the LAN resource$/ do
next if @skip_steps_while_restoring_background
leaks =, :ignore_lan => false)
STDERR.puts "#{leaks.ipv4_tcp_leaks}"
"Traffic was sent to LAN host #{@lan_host}")
......@@ -15,6 +15,14 @@ Feature: Browsing the web using the Tor Browser
And all notifications have disappeared
And I save the state so the background can be restored next scenario
Scenario: The Tor Browser cannot access the LAN
Given I capture all network traffic
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And I open some LAN resource in the Tor Browser
Then I see "TorBrowserUnableToConnect.png" after at most 20 seconds
And no traffic has flowed to the LAN resource
Scenario: The Tor Browser directory is usable
Then the amnesiac Tor Browser directory exists
And there is a GNOME bookmark for the amnesiac Tor Browser directory
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