torified_browsing.feature 9.61 KB
Newer Older
bertagaz's avatar
bertagaz committed
1
2
#10376: The "the Tor Browser loads the (startup page|Tails roadmap)" step is fragile
#10497: wait_until_tor_is_working
3
@product @fragile
4
Feature: Browsing the web using the Tor Browser
Tails developers's avatar
Tails developers committed
5
  As a Tails user
6
  when I browse the web using the Tor Browser
Tails developers's avatar
Tails developers committed
7
  all Internet traffic should flow only through Tor
8

9
  Scenario: The Tor Browser cannot access the LAN
10
    Given I have started Tails from DVD and logged in and the network is connected
11
    And a web server is running on the LAN
anonym's avatar
anonym committed
12
    And I capture all network traffic
13
14
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
anonym's avatar
anonym committed
15
    And I open a page on the LAN web server in the Tor Browser
16
    Then I see "TorBrowserUnableToConnect.png" after at most 20 seconds
anonym's avatar
anonym committed
17
    And no traffic has flowed to the LAN
18

19
  @check_tor_leaks
20
  Scenario: The Tor Browser directory is usable
21
    Given I have started Tails from DVD and logged in and the network is connected
22
23
24
    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
25
26
27
    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
28
29
    And I can print the current page as "output.pdf" to the default downloads directory

30
  @check_tor_leaks @fragile
31
  Scenario: Importing an OpenPGP key from a website
32
    Given I have started Tails from DVD and logged in and the network is connected
33
34
35
36
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And I open the address "https://tails.boum.org/tails-signing.key" in the Tor Browser
    Then I see "OpenWithImportKey.png" after at most 20 seconds
37
    When I accept to import the key with Seahorse
38
39
    Then I see "KeyImportedNotification.png" after at most 10 seconds

40
  @check_tor_leaks @fragile
41
  Scenario: Playing HTML5 audio
42
    Given I have started Tails from DVD and logged in and the network is connected
43
44
45
46
47
48
49
    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

50
  @check_tor_leaks @fragile
51
  Scenario: Watching a WebM video
52
    Given I have started Tails from DVD and logged in and the network is connected
53
54
55
56
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And I open the address "https://webm.html5.org/test.webm" in the Tor Browser
    And I click the blocked video icon
intrigeri's avatar
intrigeri committed
57
    And I see "TorBrowserNoScriptTemporarilyAllowDialog.png" after at most 30 seconds
58
59
60
61
    And I accept to temporarily allow playing this video
    Then I see "TorBrowserSampleRemoteWebMVideoFrame.png" after at most 180 seconds

  Scenario: I can view a file stored in "~/Tor Browser" but not in ~/.gnupg
62
    Given I have started Tails from DVD and logged in and the network is connected
anonym's avatar
anonym committed
63
    And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/Tor Browser/synaptic.html" as user "amnesia"
64
    And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/.gnupg/synaptic.html" as user "amnesia"
65
    And I copy "/usr/share/synaptic/html/index.html" to "/tmp/synaptic.html" as user "amnesia"
66
67
68
    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
69
    And the file "/tmp/synaptic.html" exists
anonym's avatar
anonym committed
70
71
    Given I start monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
    When I start the Tor Browser
72
    And the Tor Browser has started and loaded the startup page
anonym's avatar
anonym committed
73
    And I open the address "file:///home/amnesia/Tor Browser/synaptic.html" in the Tor Browser
74
    Then I see "TorBrowserSynapticManual.png" after at most 5 seconds
75
    And AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/home/amnesia/Tor Browser/synaptic.html"
anonym's avatar
anonym committed
76
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
77
    When I open the address "file:///home/amnesia/.gnupg/synaptic.html" in the Tor Browser
78
79
    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
80
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
81
    When I open the address "file:///lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
82
83
    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
84
    Given I restart monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
85
    When I open the address "file:///live/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
86
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
anonym's avatar
anonym committed
87
88
    # Due to our AppArmor aliases, /live/overlay will be treated
    # as /lib/live/mount/overlay.
89
    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
90
    # We do not get any AppArmor log for when access to files in /tmp is denied
91
92
93
94
95
    # 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).
96
    When I open the address "file:///tmp/synaptic.html" in the Tor Browser
97
    Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
98

99
  @doc
100
  Scenario: The "Tails documentation" link on the Desktop works
101
    Given I have started Tails from DVD and logged in and the network is connected
102
103
104
105
    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

106
  Scenario: The Tor Browser uses TBB's shared libraries
107
    Given I have started Tails from DVD and logged in and the network is connected
108
109
110
111
    When I start the Tor Browser
    And the Tor Browser has started
    Then the Tor Browser uses all expected TBB shared libraries

112
  @check_tor_leaks @fragile
113
  Scenario: Opening check.torproject.org in the Tor Browser shows the green onion and the congratulations message
114
    Given I have started Tails from DVD and logged in and the network is connected
115
116
117
118
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And I open the address "https://check.torproject.org" in the Tor Browser
    Then I see "TorBrowserTorCheck.png" after at most 180 seconds
119

120
  @check_tor_leaks @fragile
121
  Scenario: The Tor Browser's "New identity" feature works as expected
122
    Given I have started Tails from DVD and logged in and the network is connected
123
124
125
126
127
128
129
130
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
    And I open the address "https://check.torproject.org" in the Tor Browser
    Then I see "TorBrowserTorCheck.png" after at most 180 seconds
    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

131
  Scenario: The Tor Browser should not have any plugins enabled
132
    Given I have started Tails from DVD and logged in and the network is connected
133
134
    When I start the Tor Browser
    And the Tor Browser has started and loaded the startup page
135
    Then the Tor Browser has no plugins installed
136

bertagaz's avatar
bertagaz committed
137
  @fragile
138
  Scenario: The persistent Tor Browser directory is usable
139
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    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

  Scenario: Persistent browser bookmarks
154
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
155
156
157
158
159
160
161
162
163
    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
164
    And I enable read-only persistence
165
166
167
168
169
    And I log in to a new session
    And the Tails desktop is ready
    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