aboutsummaryrefslogtreecommitdiffstats
path: root/test/firefox-x11.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/firefox-x11.exp')
-rwxr-xr-xtest/firefox-x11.exp68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/firefox-x11.exp b/test/firefox-x11.exp
new file mode 100755
index 000000000..c82408896
--- /dev/null
+++ b/test/firefox-x11.exp
@@ -0,0 +1,68 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=test --x11 --net=br0 firefox www.gentoo.org\r"
8sleep 10
9
10spawn $env(SHELL)
11send -- "firejail --list\r"
12expect {
13 timeout {puts "TESTING ERROR 3\n";exit}
14 ":firejail"
15}
16expect {
17 timeout {puts "TESTING ERROR 3.1\n";exit}
18 "firefox" {puts "firefox detected\n";}
19 "iceweasel" {puts "iceweasel detected\n";}
20}
21sleep 1
22send -- "firejail --name=blablabla\r"
23expect {
24 timeout {puts "TESTING ERROR 4\n";exit}
25 "Child process initialized"
26}
27sleep 2
28
29spawn $env(SHELL)
30send -- "firemon --seccomp\r"
31expect {
32 timeout {puts "TESTING ERROR 5\n";exit}
33 " firefox" {puts "firefox detected\n";}
34 " iceweasel" {puts "iceweasel detected\n";}
35}
36expect {
37 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
38 "Seccomp: 2"
39}
40expect {
41 timeout {puts "TESTING ERROR 5.1\n";exit}
42 "name=blablabla"
43}
44sleep 1
45send -- "firemon --caps\r"
46expect {
47 timeout {puts "TESTING ERROR 6\n";exit}
48 " firefox" {puts "firefox detected\n";}
49 " iceweasel" {puts "iceweasel detected\n";}
50}
51expect {
52 timeout {puts "TESTING ERROR 6.1\n";exit}
53 "CapBnd:"
54}
55expect {
56 timeout {puts "TESTING ERROR 6.2\n";exit}
57 "0000000000000000"
58}
59expect {
60 timeout {puts "TESTING ERROR 6.3\n";exit}
61 "name=blablabla"
62}
63sleep 1
64send -- "firejail --shutdown=test\r"
65sleep 3
66
67puts "\nall done\n"
68