4 I want to view and print PDF files in Evince
5 And AppArmor should prevent Evince from doing dangerous things
9 Scenario: I can view and print a PDF file stored in /usr/share
10 Given I have started Tails from DVD without network and logged in
11 When I open "/usr/share/cups/data/default-testpage.pdf" with Evince
12 Then I see "CupsTestPage.png" after at most 40 seconds
13 And I can print the current document to "/home/amnesia/output.pdf"
17 Scenario: I can view and print a PDF file stored in non-persistent /home/amnesia
18 Given I have started Tails from DVD without network and logged in
19 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia" as user "amnesia"
20 When I open "/home/amnesia/default-testpage.pdf" with Evince
21 Then I see "CupsTestPage.png" after at most 40 seconds
22 And I can print the current document to "/home/amnesia/output.pdf"
24 Scenario: I cannot view a PDF file stored in non-persistent /home/amnesia/.gnupg
25 Given I have started Tails from DVD without network and logged in
26 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/.gnupg" as user "amnesia"
27 Then the file "/home/amnesia/.gnupg/default-testpage.pdf" exists
28 And the file "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf" exists
29 And the file "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf" exists
30 Given I start monitoring the AppArmor log of "/usr/bin/evince"
31 When I try to open "/home/amnesia/.gnupg/default-testpage.pdf" with Evince
32 Then I see "EvinceUnableToOpen.png" after at most 10 seconds
33 And AppArmor has denied "/usr/bin/evince" from opening "/home/amnesia/.gnupg/default-testpage.pdf"
35 Given I restart monitoring the AppArmor log of "/usr/bin/evince"
36 When I try to open "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf" with Evince
37 Then I see "EvinceUnableToOpen.png" after at most 10 seconds
38 And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
40 Given I restart monitoring the AppArmor log of "/usr/bin/evince"
41 When I try to open "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf" with Evince
42 Then I see "EvinceUnableToOpen.png" after at most 10 seconds
43 # Due to our AppArmor aliases, /live/overlay will be treated
44 # as /lib/live/mount/overlay.
45 And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
49 Scenario: I can view and print a PDF file stored in persistent /home/amnesia/Persistent
50 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
51 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/Persistent" as user "amnesia"
52 Then the file "/home/amnesia/Persistent/default-testpage.pdf" exists
53 When I open "/home/amnesia/Persistent/default-testpage.pdf" with Evince
54 Then I see "CupsTestPage.png" after at most 40 seconds
55 And I can print the current document to "/home/amnesia/Persistent/output.pdf"
57 Scenario: I cannot view a PDF file stored in persistent /home/amnesia/.gnupg
58 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
59 And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/.gnupg" as user "amnesia"
60 Then the file "/home/amnesia/.gnupg/default-testpage.pdf" exists
61 Given I start monitoring the AppArmor log of "/usr/bin/evince"
62 And I try to open "/home/amnesia/.gnupg/default-testpage.pdf" with Evince
63 Then I see "EvinceUnableToOpen.png" after at most 10 seconds
64 And AppArmor has denied "/usr/bin/evince" from opening "/home/amnesia/.gnupg/default-testpage.pdf"