Ensure the bits sent to the TR are not mangled along the way (refs: #12629)
[tails.git] / features / totem.feature
blob29447390c64eae9ff220399ee2e1d4a861ceaf04
1 @product
2 Feature: Using Totem
3   As a Tails user
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
8   Background:
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"
20     Given I close Totem
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 I see "TotemUnableToOpen.png" after at most 10 seconds
26     And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"
27     Given I close Totem
28     And the file "/lib/live/mount/overlay/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/home/amnesia/.gnupg/video.mp4" with Totem
31     Then I see "TotemUnableToOpen.png" after at most 10 seconds
32     And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
33     Given I close Totem
34     And the file "/live/overlay/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/home/amnesia/.gnupg/video.mp4" with Totem
37     Then I see "TotemUnableToOpen.png" after at most 10 seconds
38     # Due to our AppArmor aliases, /live/overlay will be treated
39     # as /lib/live/mount/overlay.
40     And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
41     Given I close Totem
42     And I copy "/home/amnesia/video.mp4" to "/home/amnesia/.purple/otr.private_key" as user "amnesia"
43     And I restart monitoring the AppArmor log of "/usr/bin/totem"
44     When I try to open "/home/amnesia/.purple/otr.private_key" with Totem
45     Then I see "TotemUnableToOpen.png" after at most 10 seconds
46     And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.purple/otr.private_key"
48   @check_tor_leaks @fragile
49   Scenario: Watching a WebM video over HTTPS
50     Given I have started Tails from DVD and logged in and the network is connected
51     Then I can watch a WebM video over HTTPs
53   Scenario: Watching MP4 videos stored on the persistent volume should work as expected given our AppArmor confinement
54     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
55     And I plug and mount a USB drive containing sample videos
56     And I copy the sample videos to "/home/amnesia/Persistent" as user "amnesia"
57     When I open "/home/amnesia/Persistent/video.mp4" with Totem
58     Then I see "SampleLocalMp4VideoFrame.png" after at most 40 seconds
59     Given I close Totem
60     And I start monitoring the AppArmor log of "/usr/bin/totem"
61     And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia"
62     When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem
63     Then I see "TotemUnableToOpen.png" after at most 10 seconds
64     And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"