aboutsummaryrefslogtreecommitdiffstats
path: root/test/apps-x11/chromium.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/apps-x11/chromium.exp')
-rwxr-xr-xtest/apps-x11/chromium.exp85
1 files changed, 85 insertions, 0 deletions
diff --git a/test/apps-x11/chromium.exp b/test/apps-x11/chromium.exp
new file mode 100755
index 000000000..11677a28f
--- /dev/null
+++ b/test/apps-x11/chromium.exp
@@ -0,0 +1,85 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test --x11 --net=br0 chromium www.gentoo.org\r"
11sleep 10
12
13spawn $env(SHELL)
14send -- "firejail --list\r"
15expect {
16 timeout {puts "TESTING ERROR 3\n";exit}
17 ":firejail"
18}
19expect {
20 timeout {puts "TESTING ERROR 3.1\n";exit}
21 "chromium"
22}
23sleep 1
24
25# grsecurity exit
26send -- "file /proc/sys/kernel/grsecurity\r"
27expect {
28 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
29 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
30 "cannot open" {puts "grsecurity not present\n"}
31}
32send -- "firejail --name=blablabla\r"
33expect {
34 timeout {puts "TESTING ERROR 4\n";exit}
35 "Child process initialized"
36}
37sleep 2
38
39spawn $env(SHELL)
40send -- "firemon --seccomp\r"
41expect {
42 timeout {puts "TESTING ERROR 5\n";exit}
43 ":firejail"
44}
45expect {
46 timeout {puts "TESTING ERROR 5.0\n";exit}
47 "chromium"
48}
49expect {
50 timeout {puts "TESTING ERROR 5.1\n";exit}
51 "Seccomp: 0"
52}
53expect {
54 timeout {puts "TESTING ERROR 5.1\n";exit}
55 "name=blablabla"
56}
57sleep 1
58send -- "firemon --caps\r"
59expect {
60 timeout {puts "TESTING ERROR 6\n";exit}
61 ":firejail"
62}
63expect {
64 timeout {puts "TESTING ERROR 6.0\n";exit}
65 "chromium"
66}
67expect {
68 timeout {puts "TESTING ERROR 6.1\n";exit}
69 "CapBnd:"
70}
71expect {
72 timeout {puts "TESTING ERROR 6.2\n";exit}
73 "fffffffff"
74}
75expect {
76 timeout {puts "TESTING ERROR 6.3\n";exit}
77 "name=blablabla"
78}
79sleep 1
80send -- "firejail --shutdown=test\r"
81sleep 3
82
83
84puts "\nall done\n"
85