torified_browsing.feature 8.37 KB
Newer Older
1
@product
2
Feature: Browsing the web using the Tor Browser
Tails developers's avatar
Tails developers committed
3
  As a Tails user
4
  when I browse the web using the Tor Browser
Tails developers's avatar
Tails developers committed
5
  all Internet traffic should flow only through Tor
6

7
  Scenario: The Tor Browser cannot access the LAN
8
    Given I have started Tails from DVD and logged in and the network is connected
9
    And a web server is running on the LAN
anonym's avatar
anonym committed
10
    And I capture all network traffic
11
12
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
anonym's avatar
anonym committed
13
    And I open a page on the LAN web server in the Tor Browser
anonym's avatar
anonym committed
14
    Then the Tor Browser shows the "Unable to connect" error
anonym's avatar
anonym committed
15
    And no traffic was sent to the web server on the LAN
16

17
  @check_tor_leaks
18
  Scenario: The Tor Browser directory is usable
19
    Given I have started Tails from DVD and logged in and the network is connected
20
21
22
    Then the amnesiac Tor Browser directory exists
    And there is a GNOME bookmark for the amnesiac Tor Browser directory
    And the persistent Tor Browser directory does not exist
23
24
25
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    Then I can save the current page as "index.html" to the default downloads directory
26
27
    And I can print the current page as "output.pdf" to the default downloads directory

28
29
30
31
32
33
34
35
36
37
  @check_tor_leaks @fragile
  Scenario: Downloading files with the Tor Browser
    Given I have started Tails from DVD and logged in and the network is connected
    When I start the Tor Browser
    Then the Tor Browser has started and loaded the startup page
    When I download some file in the Tor Browser
    Then I get the browser download dialog
    When I save the file to the default Tor Browser download directory
    Then the file is saved to the default Tor Browser download directory

38
  @check_tor_leaks @fragile
39
  Scenario: Playing HTML5 audio
40
    Given I have started Tails from DVD and logged in and the network is connected
41
42
43
44
45
46
47
48
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And no application is playing audio
    And I open the address "http://www.terrillthompson.com/tests/html5-audio.html" in the Tor Browser
    And I click the HTML5 play button
    And 1 application is playing audio after 10 seconds

  Scenario: I can view a file stored in "~/Tor Browser" but not in ~/.gnupg
49
    Given I have started Tails from DVD and logged in and the network is connected
anonym's avatar
anonym committed
50
    And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/Tor Browser/synaptic.html" as user "amnesia"
51
    And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/.gnupg/synaptic.html" as user "amnesia"
52
    And I copy "/usr/share/synaptic/html/index.html" to "/tmp/synaptic.html" as user "amnesia"
53
54
55
    Then the file "/home/amnesia/.gnupg/synaptic.html" exists
    And the file "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html" exists
    And the file "/live/overlay/home/amnesia/.gnupg/synaptic.html" exists
56
    And the file "/tmp/synaptic.html" exists
anonym's avatar
anonym committed
57
58
    Given I start monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
    When I start the Tor Browser
59
    And the Tor Browser has started and loaded the startup page
anonym's avatar
anonym committed
60
    And I open the address "file:///home/amnesia/Tor Browser/synaptic.html" in the Tor Browser
61
    Then I see "TorBrowserSynapticManual.png" after at most 5 seconds
62
    And AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/home/amnesia/Tor Browser/synaptic.html"
anonym's avatar
anonym committed
63
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
64
    When I open the address "file:///home/amnesia/.gnupg/synaptic.html" in the Tor Browser
65
66
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
    And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/home/amnesia/.gnupg/synaptic.html"
anonym's avatar
anonym committed
67
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
68
    When I open the address "file:///lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
69
70
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
    And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
anonym's avatar
anonym committed
71
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
72
    When I open the address "file:///live/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
73
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
anonym's avatar
anonym committed
74
75
    # Due to our AppArmor aliases, /live/overlay will be treated
    # as /lib/live/mount/overlay.
76
    And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
intrigeri's avatar
intrigeri committed
77
    # We do not get any AppArmor log for when access to files in /tmp is denied
78
79
80
81
82
    # since we explictly override (commit 51c0060) the rules (from the user-tmp
    # abstration) that would otherwise allow it, and we do so with "deny", which
    # also specifies "noaudit". We could explicitly specify "audit deny" and
    # then have logs, but it could be a problem when we set up desktop
    # notifications for AppArmor denials (#9337).
83
    When I open the address "file:///tmp/synaptic.html" in the Tor Browser
84
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
85

86
  @doc
87
  Scenario: The "Tails documentation" link on the Desktop works
88
    Given I have started Tails from DVD and logged in and the network is connected
89
90
91
92
    When I double-click on the "Tails documentation" link on the Desktop
    Then the Tor Browser has started
    And I see "TailsOfflineDocHomepage.png" after at most 10 seconds

93
  Scenario: The Tor Browser uses TBB's shared libraries
94
    Given I have started Tails from DVD and logged in and the network is connected
95
96
97
98
    When I start the Tor Browser
    And the Tor Browser has started
    Then the Tor Browser uses all expected TBB shared libraries

99
  @check_tor_leaks @fragile
100
  Scenario: The Tor Browser's "New identity" feature works as expected
101
    Given I have started Tails from DVD and logged in and the network is connected
102
103
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
104
105
    And I open Tails homepage in the Tor Browser
    Then Tails homepage loads in the Tor Browser
106
107
108
109
    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

110
  Scenario: The Tor Browser should not have any plugins enabled
111
    Given I have started Tails from DVD and logged in and the network is connected
112
113
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
114
    Then the Tor Browser has no plugins installed
115

116
  #10720
bertagaz's avatar
bertagaz committed
117
  @fragile
118
  Scenario: The persistent Tor Browser directory is usable
119
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
120
121
122
123
124
125
126
127
128
129
130
131
132
    And the network is plugged
    And Tor is ready
    And available upgrades have been checked
    And all notifications have disappeared
    Then the persistent Tor Browser directory exists
    And there is a GNOME bookmark for the persistent Tor Browser directory
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And I can save the current page as "index.html" to the persistent Tor Browser directory
    When I open the address "file:///home/amnesia/Persistent/Tor Browser/index.html" in the Tor Browser
    Then I see "TorBrowserSavedStartupPage.png" after at most 10 seconds
    And I can print the current page as "output.pdf" to the persistent Tor Browser directory

133
134
  #10720
  @fragile
135
  Scenario: Persistent browser bookmarks
136
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
137
138
139
140
141
142
143
144
145
    And all persistence presets are enabled
    And all persistent filesystems have safe access rights
    And all persistence configuration files have safe access rights
    And all persistent directories have safe access rights
    And I start the Tor Browser in offline mode
    And the Tor Browser has started in offline mode
    And I add a bookmark to eff.org in the Tor Browser
    And I warm reboot the computer
    And the computer reboots Tails
146
    And I enable read-only persistence
147
148
149
150
    And I log in to a new session
    And I start the Tor Browser in offline mode
    And the Tor Browser has started in offline mode
    Then the Tor Browser has a bookmark to eff.org