Merge remote-tracking branch 'origin/master' into stable
[tails.git] / features / torified_browsing.feature
blob31a3ede5293bb22d414e73fdca2ca2a9d1cb495e
1 @product
2 Feature: Browsing the web using the Tor Browser
3   As a Tails user
4   when I browse the web using the Tor Browser
5   all Internet traffic should flow only through Tor
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
10     And I capture all network traffic
11     When I start the Tor Browser
12     And the Tor Browser loads the startup page
13     And I open a page on the LAN web server in the Tor Browser
14     Then the Tor Browser shows the "Unable to connect" error
15     And no traffic was sent to the web server on the LAN
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     Then the amnesiac Tor Browser directory exists
21     And there is a GNOME bookmark for the amnesiac Tor Browser directory
22     And the persistent Tor Browser directory does not exist
23     When I start the Tor Browser
24     And the Tor Browser loads the startup page
25     Then I can save the current page as "index.html" to the default downloads directory
26     And I can print the current page as "output.pdf" to the default downloads directory
28   @check_tor_leaks
29   Scenario: Downloading files with the Tor Browser
30     Given I have started Tails from DVD and logged in and the network is connected
31     When I start the Tor Browser
32     Then the Tor Browser loads the startup page
33     When I download some file in the Tor Browser
34     Then the file is saved to the default Tor Browser download directory
36   @check_tor_leaks
37   Scenario: Playing an Ogg audio track
38     Given I have started Tails from DVD and logged in and the network is connected
39     When I start the Tor Browser
40     And the Tor Browser loads the startup page
41     Then I can listen to an Ogg audio track in Tor Browser
43   @check_tor_leaks
44   Scenario: Watching a WebM video
45     Given I have started Tails from DVD and logged in and the network is connected
46     When I start the Tor Browser
47     And the Tor Browser loads the startup page
48     Then I can watch a WebM video in Tor Browser
50   Scenario: I can view a file stored in "~/Tor Browser" but not in ~/.gnupg
51     Given I have started Tails from DVD and logged in and the network is connected
52     And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/Tor Browser/synaptic.html" as user "amnesia"
53     And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/.gnupg/synaptic.html" as user "amnesia"
54     And I copy "/usr/share/synaptic/html/index.html" to "/tmp/synaptic.html" as user "amnesia"
55     Then the file "/home/amnesia/.gnupg/synaptic.html" exists
56     And the file "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/synaptic.html" exists
57     And the file "/live/overlay/rw/home/amnesia/.gnupg/synaptic.html" exists
58     And the file "/tmp/synaptic.html" exists
59     Given I start monitoring the AppArmor log of "torbrowser_firefox"
60     When I start the Tor Browser
61     And the Tor Browser loads the startup page
62     And I open the address "file:///home/amnesia/Tor Browser/synaptic.html" in the Tor Browser
63     Then I see "TorBrowserSynapticManual.png" after at most 5 seconds
64     And AppArmor has not denied "torbrowser_firefox" from opening "/home/amnesia/Tor Browser/synaptic.html"
65     Given I restart monitoring the AppArmor log of "torbrowser_firefox"
66     When I open the address "file:///home/amnesia/.gnupg/synaptic.html" in the Tor Browser
67     Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
68     And AppArmor has denied "torbrowser_firefox" from opening "/home/amnesia/.gnupg/synaptic.html"
69     Given I restart monitoring the AppArmor log of "torbrowser_firefox"
70     When I open the address "file:///lib/live/mount/overlay/rw/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
71     Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
72     And AppArmor has denied "torbrowser_firefox" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/synaptic.html"
73     Given I restart monitoring the AppArmor log of "torbrowser_firefox"
74     When I open the address "file:///live/overlay/rw/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
75     Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
76     # Due to our AppArmor aliases, /live/overlay will be treated
77     # as /lib/live/mount/overlay.
78     And AppArmor has denied "torbrowser_firefox" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/synaptic.html"
79     # We do not get any AppArmor log for when access to files in /tmp is denied
80     # since we explictly override (commit 51c0060) the rules (from the user-tmp
81     # abstraction) that would otherwise allow it, and we do so with "deny", which
82     # also specifies "noaudit". We could explicitly specify "audit deny" and
83     # then have logs, but it could be a problem when we set up desktop
84     # notifications for AppArmor denials (#9337).
85     When I open the address "file:///tmp/synaptic.html" in the Tor Browser
86     Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
88   Scenario: The Tor Browser uses TBB's shared libraries
89     Given I have started Tails from DVD and logged in and the network is connected
90     When I start the Tor Browser
91     Then the Tor Browser uses all expected TBB shared libraries
93   @check_tor_leaks
94   Scenario: The Tor Browser's "New identity" feature works as expected
95     Given I have started Tails from DVD and logged in and the network is connected
96     When I start the Tor Browser
97     And the Tor Browser loads the startup page
98     And I open the Tails homepage in the Tor Browser
99     Then the Tor Browser loads the Tails homepage
100     When I request a new identity in Tor Browser
101     Then the Tor Browser restarts into a fresh session
103   Scenario: The Tor Browser's circuit view feature works as expected
104     Given I have started Tails from DVD and logged in and the network is connected
105     When I start the Tor Browser
106     And the Tor Browser loads the startup page
107     Then Tor Browser's circuit view is working
109   Scenario: WebRTC is disabled in Tor Browser
110     Given I have started Tails from DVD and logged in and the network is connected
111     When I start the Tor Browser
112     And the Tor Browser loads the startup page
113     When I open the address "https://net.ipcalf.com/" in the Tor Browser
114     Then Tor Browser displays a 'ifconfig | grep inet | grep -v inet6 | cut -d" " -f2 | tail -n1' heading on the "Network IP Address via ipcalf.com" page
115     When I open the address "https://mozilla.github.io/webrtc-landing/pc_test.html" in the Tor Browser
116     Then Tor Browser displays a "RTCPeerConnection is missing!" heading on the "Simple RTCPeerConnection Video Test" page
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     And the network is plugged
121     And I successfully configure Tor
122     And available upgrades have been checked
123     And all notifications have disappeared
124     Then the persistent Tor Browser directory exists
125     And there is a GNOME bookmark for the persistent Tor Browser directory
126     When I start the Tor Browser
127     And I open the address "https://tails.net/about" in the Tor Browser
128     And "Tails - How Tails works" has loaded in the Tor Browser
129     Then I can save the current page as "index.html" to the persistent Tor Browser directory
130     And I open the address "file:///home/amnesia/Persistent/Tor Browser/index.html" in the Tor Browser
131     Then "Tails - How Tails works" has loaded in the Tor Browser
132     And I can print the current page as "output.pdf" to the persistent Tor Browser directory
134   Scenario Outline: The default XDG directories are usable in Tor Browser
135     Given I have started Tails from DVD without network and logged in
136     Then the amnesiac <dir> directory exists
137     And there is a GNOME bookmark for the amnesiac <dir> directory
138     Then I start the Tor Browser in offline mode
139     And I can save the current page as "index.html" to the <dir> GNOME bookmark
140     Examples:
141       | dir |
142       | Documents |
143       | Downloads |
144       | Music |
145       | Pictures |
146       | Videos |
148   Scenario: Persistent browser bookmarks
149     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
150     And all tps features are active
151     And all persistent filesystems have safe access rights
152     And all persistence configuration files have safe access rights
153     And all persistent directories have safe access rights
154     When I start the Tor Browser in offline mode
155     And I add a bookmark to eff.org in the Tor Browser
156     And I cold reboot the computer
157     And the computer reboots Tails
158     And I enable persistence
159     And I log in to a new session
160     And all notifications have disappeared
161     And I start the Tor Browser in offline mode
162     Then the Tor Browser has a bookmark to eff.org