From 225533a6c18a973a3ec2d7afbd8fbb1b4464f398 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Feb 06 2016 22:56:00 +0000 Subject: added test to check for www.centos.org as startpage in the firefox default settings --- diff --git a/tests/p_firefox/00-install_firefox.sh b/tests/p_firefox/00-install_firefox.sh new file mode 100755 index 0000000..8973798 --- /dev/null +++ b/tests/p_firefox/00-install_firefox.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Christoph Galuschka + +# Install firefox + +t_Log "Running $0 - installation of firefox." + +t_InstallPackage firefox + diff --git a/tests/p_firefox/10-check_default_startpage.sh b/tests/p_firefox/10-check_default_startpage.sh new file mode 100755 index 0000000..6ec7aa7 --- /dev/null +++ b/tests/p_firefox/10-check_default_startpage.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Author: Christoph Galuschka + +# Check for centos.org in preferences.js +t_Log "Running $0 - firefox has www.centos.org as default page." + +if [ $(t_GetArch) = i686 ] + then + path='/usr/lib/firefox/defaults/preferences/all-redhat.js' + else + path='/usr/lib64/firefox/defaults/preferences/all-redhat.js' +fi + +count=$(grep -c www.centos.org $path) + +if [ $count=2 ] + then + t_CheckExitStatus 0 + else + t_CheckExitStatus 1 +fi