This commit is contained in:
netblue30 2015-11-30 07:09:14 -05:00
parent b26054f890
commit f2f3f1edba
2 changed files with 81 additions and 0 deletions

72
test/google-chrome.exp Executable file
View file

@ -0,0 +1,72 @@
#!/usr/bin/expect -f
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail google-chrome www.gentoo.org\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"Reading profile /etc/firejail/chromium.profile"
}
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"Child process initialized"
}
sleep 10
spawn $env(SHELL)
send -- "firejail --list\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
":firejail"
}
expect {
timeout {puts "TESTING ERROR 3.1\n";exit}
"google-chrome"
}
sleep 1
send -- "firejail --name=blablabla\r"
expect {
timeout {puts "TESTING ERROR 4\n";exit}
"Child process initialized"
}
sleep 2
spawn $env(SHELL)
send -- "firemon --seccomp\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
":firejail google-chrome"
}
expect {
timeout {puts "TESTING ERROR 5.1\n";exit}
"Seccomp: 0"
}
expect {
timeout {puts "TESTING ERROR 5.1\n";exit}
"name=blablabla"
}
sleep 1
send -- "firemon --caps\r"
expect {
timeout {puts "TESTING ERROR 6\n";exit}
":firejail google-chrome"
}
expect {
timeout {puts "TESTING ERROR 6.1\n";exit}
"CapBnd:"
}
expect {
timeout {puts "TESTING ERROR 6.2\n";exit}
"fffffffff"
}
expect {
timeout {puts "TESTING ERROR 6.3\n";exit}
"name=blablabla"
}
sleep 1
puts "\n"

View file

@ -179,6 +179,15 @@ else
echo "TESTING: chromium not found"
fi
which google-chrome
if [ "$?" -eq 0 ];
then
echo "TESTING: google-chrome"
./chromium.exp
else
echo "TESTING: google-chrome not found"
fi
which opera
if [ "$?" -eq 0 ];
then