totem.feature 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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
  7. Background:
  8. Given I create sample videos
  9. Scenario: Watching a MP4 video stored on the non-persistent filesystem
  10. Given a computer
  11. And I setup a filesystem share containing sample videos
  12. And I start Tails from DVD with network unplugged and I login
  13. And I copy the sample videos to "/home/amnesia" as user "amnesia"
  14. And the file "/home/amnesia/video.mp4" exists
  15. Given I start monitoring the AppArmor log of "/usr/bin/totem"
  16. When I open "/home/amnesia/video.mp4" with Totem
  17. Then I see "SampleLocalMp4VideoFrame.png" after at most 40 seconds
  18. And AppArmor has not denied "/usr/bin/totem" from opening "/home/amnesia/video.mp4"
  19. Given I close Totem
  20. And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia"
  21. And the file "/home/amnesia/.gnupg/video.mp4" exists
  22. And I restart monitoring the AppArmor log of "/usr/bin/totem"
  23. When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem
  24. Then I see "TotemUnableToOpen.png" after at most 10 seconds
  25. And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"
  26. Given I close Totem
  27. And the file "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4" exists
  28. And I restart monitoring the AppArmor log of "/usr/bin/totem"
  29. When I try to open "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4" with Totem
  30. Then I see "TotemUnableToOpen.png" after at most 10 seconds
  31. And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
  32. Given I close Totem
  33. And the file "/live/overlay/home/amnesia/.gnupg/video.mp4" exists
  34. And I restart monitoring the AppArmor log of "/usr/bin/totem"
  35. When I try to open "/live/overlay/home/amnesia/.gnupg/video.mp4" with Totem
  36. Then I see "TotemUnableToOpen.png" after at most 10 seconds
  37. # Due to our AppArmor aliases, /live/overlay will be treated
  38. # as /lib/live/mount/overlay.
  39. And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
  40. Given I close Totem
  41. And I copy "/home/amnesia/video.mp4" to "/home/amnesia/.purple/otr.private_key" as user "amnesia"
  42. And I restart monitoring the AppArmor log of "/usr/bin/totem"
  43. When I try to open "/home/amnesia/.purple/otr.private_key" with Totem
  44. Then I see "TotemUnableToOpen.png" after at most 10 seconds
  45. And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.purple/otr.private_key"
  46. @check_tor_leaks @fragile
  47. Scenario: Watching a WebM video over HTTPS
  48. Given I have started Tails from DVD and logged in and the network is connected
  49. Then I can watch a WebM video over HTTPs
  50. Scenario: Watching MP4 videos stored on the persistent volume should work as expected given our AppArmor confinement
  51. Given I have started Tails without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
  52. # Due to bug #5571 we have to reboot to be able to use
  53. # filesystem shares.
  54. And I shutdown Tails and wait for the computer to power off
  55. And I setup a filesystem share containing sample videos
  56. And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
  57. And I copy the sample videos to "/home/amnesia/Persistent" as user "amnesia"
  58. And I copy the sample videos to "/home/amnesia/.gnupg" as user "amnesia"
  59. And I shutdown Tails and wait for the computer to power off
  60. And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
  61. And the file "/home/amnesia/Persistent/video.mp4" exists
  62. When I open "/home/amnesia/Persistent/video.mp4" with Totem
  63. Then I see "SampleLocalMp4VideoFrame.png" after at most 40 seconds
  64. Given I close Totem
  65. And the file "/home/amnesia/.gnupg/video.mp4" exists
  66. And I start monitoring the AppArmor log of "/usr/bin/totem"
  67. When I try to open "/home/amnesia/.gnupg/video.mp4" with Totem
  68. Then I see "TotemUnableToOpen.png" after at most 10 seconds
  69. And AppArmor has denied "/usr/bin/totem" from opening "/home/amnesia/.gnupg/video.mp4"