Commits

Anonymous committed 43482a1

Initial commit

  • Participants

Comments (0)

Files changed (4)

+Check which of the current installed Google Chrome or Firefox is the fastest
+browser to open and close a window.
+
+This is Public Domain software
+<html>
+<body onload="open('about:blank', '_self').close()">
+</body>
+</html>
+#!/bin/sh
+
+nrun=10
+ft=0
+ct=0
+
+if [ $# -lt 1 ]; then
+
+	cat <<!
+Disable all your extensions in both Google Chrome and Firefox.
+Browsers should not open the last opened window by default.
+Firefox: change the dom.allow_scripts_to_close_windows to true in about:config.
+Close all Google Chrome and Firefox windows.
+
+Press enter to continue
+!
+	dd if=/dev/stdin of=/dev/null bs=1 count=1 >/dev/null 2>&1
+
+else if [ "$1" == "-h" ]; then
+	echo usage: $0 [-h] [#-of-runs]
+else
+	nrun=$1
+fi
+
+
+for i in `seq $nrun`; do
+	t=`time -f %e ./runbr.sh firefox 2>&1`
+	ft=`echo $ft $t + p | dc`
+done
+
+for i in `seq $nrun`; do
+	t=`time -f %e ./runbr.sh google-chrome 2>&1`
+	ct=`echo $ct $t + p | dc`
+done
+
+echo 2 k $ft $nrun / p | dc
+echo 2 k $ct $nrun / p | dc
+#!/bin/sh
+
+$1 ./close.html >/dev/null 2>&1