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