summaryrefslogtreecommitdiff
path: root/test/browser.sh.in
blob: c56b4bf12bbd070a8f82fa20816366be86eff7f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

abs_top_srcdir="@abs_top_srcdir@"
abs_top_builddir="@abs_top_builddir@"

BROWSER=${BROWSER-firefox}
MOZ_PLUGIN_PATH="$abs_top_builddir/src/.libs${MOZ_PLUGIN_PATH+:$MOZ_PLUGIN_PATH}"
EVBP_DEBUG=1
G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG-evince-browser-plugin}
G_DEBUG=${G_DEBUG-fatal_criticals}
export MOZ_PLUGIN_PATH EVBP_DEBUG G_MESSAGES_DEBUG G_DEBUG

# if there are no args, open test.html
[ -z "$1" ] && set -- "$abs_top_srcdir/test/test.html"

case "$BROWSER" in
*firefox*|*seamonkey*|*mozilla*|*iceweasel*)
    # allow a separate profile to be used
    test -n "$EVBP_PROFILE" && set -- -P "$EVBP_PROFILE" "$@"

    # start in a separate process
    set -- -no-remote "$@"
    ;;
*epiphany*)
    # allow a separate profile to be used
    test -n "$EVBP_PROFILE" && set -- --profile="$EVBP_PROFILE" -p "$@"
    ;;
esac

exec $BROWSER "$@"