4 I want to watch local and remote videos in Totem
5 And AppArmor should prevent Totem from doing dangerous things
6 And all Internet traffic should flow only through Tor
9 Given I create sample videos
11 Scenario: Watching a MP4 video stored on the non-persistent filesystem
12 Given I have started Tails from DVD without network and logged in
13 And I plug and mount a USB drive containing sample videos
14 And I copy the sample videos to "/home/amnesia" as user "amnesia"
15 And the file "/home/amnesia/video.mp4" exists
16 Given I start monitoring the AppArmor log of "/usr/bin/totem"
17 When I open "/home/amnesia/video.mp4" with Totem
18 Then I see "SampleLocalMp4VideoFrame.png" after at most 40 seconds
19 And AppArmor has not denied "/usr/bin/totem" from opening "/home/amnesia/video.mp4"
21 And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia"
22 And the file "/home/amnesia/.gnupg/video.mp4" exists
23 And I restart monitoring the AppArmor log of "/usr/bin/totem"
24 When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem
25 Then Totem tells me it is not allowed to open this file
26 And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"
28 And the file "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/video.mp4" exists
29 And I restart monitoring the AppArmor log of "/usr/bin/totem"
30 When I try to open "/lib/live/mount/overlay/rw/home/amnesia/.gnupg/video.mp4" with Totem
31 Then Totem tells me it is not allowed to open this file
32 And AppArmor has denied "/usr/bin/totem" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/video.mp4"
34 And the file "/live/overlay/rw/home/amnesia/.gnupg/video.mp4" exists
35 And I restart monitoring the AppArmor log of "/usr/bin/totem"
36 When I try to open "/live/overlay/rw/home/amnesia/.gnupg/video.mp4" with Totem
37 Then Totem tells me it is not allowed to open this file
38 # Due to our AppArmor aliases, /live/overlay will be treated
39 # as /usr/lib/live/mount/overlay.
40 And AppArmor has denied "/usr/bin/totem" from opening "/usr/lib/live/mount/overlay/rw/home/amnesia/.gnupg/video.mp4"
42 And I copy "/home/amnesia/video.mp4" to "/home/amnesia/.purple/otr.private_key" as user "amnesia"
43 And the file "/home/amnesia/.purple/otr.private_key" exists
44 And I restart monitoring the AppArmor log of "/usr/bin/totem"
45 When I try to open "/home/amnesia/.purple/otr.private_key" with Totem
46 Then Totem tells me it is not allowed to open this file
47 And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.purple/otr.private_key"
50 Scenario: Watching a WebM video over HTTPS
51 Given I have started Tails from DVD and logged in and the network is connected
52 Then I can watch a WebM video over HTTPs
54 Scenario: Watching MP4 videos stored on the persistent volume should work as expected given our AppArmor confinement
55 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
56 And I plug and mount a USB drive containing sample videos
57 And I copy the sample videos to "/home/amnesia/Persistent" as user "amnesia"
58 When I open "/home/amnesia/Persistent/video.mp4" with Totem
59 Then I see "SampleLocalMp4VideoFrame.png" after at most 40 seconds
61 And I start monitoring the AppArmor log of "/usr/bin/totem"
62 And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia"
63 When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem
64 Then Totem tells me it is not allowed to open this file
65 And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"