Added firefox profile and selenium startup scripts
This commit is contained in:
Родитель
6ad23bae0e
Коммит
66f2be8357
Двоичный файл не отображается.
|
@ -0,0 +1 @@
|
|||
{"title":"","id":1,"dateAdded":1323459897361498,"lastModified":1323459897362531,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"title":"Bookmarks Menu","id":2,"parent":1,"dateAdded":1323459897361775,"lastModified":1323459897865518,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"title":"Recently Bookmarked","id":14,"parent":2,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"RecentlyBookmarked"}],"type":"text/x-moz-place","uri":"place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&sort=12&excludeQueries=1&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10&queryType=1"},{"index":1,"title":"Recent Tags","id":15,"parent":2,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"RecentTags"}],"type":"text/x-moz-place","uri":"place:sort=14&type=6&maxResults=10&queryType=1"},{"index":2,"title":"","id":16,"parent":2,"dateAdded":1323459897865518,"lastModified":1323459897865518,"type":"text/x-moz-place-separator"},{"index":3,"title":"Mozilla Firefox","id":8,"parent":2,"dateAdded":1323459897813834,"lastModified":1323459897815786,"type":"text/x-moz-place-container","children":[{"title":"Help and Tutorials","id":9,"parent":8,"dateAdded":1323459897813963,"lastModified":1323459897814570,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/help/"},{"index":1,"title":"Customize Firefox","id":10,"parent":8,"dateAdded":1323459897814745,"lastModified":1323459897815127,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/customize/"},{"index":2,"title":"Get Involved","id":11,"parent":8,"dateAdded":1323459897815260,"lastModified":1323459897815642,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/community/"},{"index":3,"title":"About Us","id":12,"parent":8,"dateAdded":1323459897815786,"lastModified":1323459897816152,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/about/"}]}]},{"index":1,"title":"Bookmarks Toolbar","id":3,"parent":1,"dateAdded":1323459897362217,"lastModified":1323459897864194,"annos":[{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar"}],"type":"text/x-moz-place-container","root":"toolbarFolder","children":[{"title":"Most Visited","id":13,"parent":3,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"MostVisited"}],"type":"text/x-moz-place","uri":"place:sort=8&redirectsMode=2&maxResults=10"},{"index":1,"title":"Getting Started","id":6,"parent":3,"dateAdded":1323459897812711,"lastModified":1323459897813187,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/central/"},{"index":2,"title":"Latest Headlines","id":7,"parent":3,"dateAdded":1323459897813366,"lastModified":1323459905525156,"livemark":1,"annos":[{"name":"placesInternal/READ_ONLY","flags":0,"expires":4,"mimeType":null,"type":1,"value":1},{"name":"livemark/feedURI","flags":0,"expires":4,"mimeType":null,"type":3,"value":"http://fxfeeds.mozilla.com/en-US/firefox/headlines.xml"},{"name":"livemark/siteURI","flags":0,"expires":4,"mimeType":null,"type":3,"value":"http://www.bbc.co.uk/go/rss/int/news/-/news/"},{"name":"livemark/expiration","flags":0,"expires":4,"mimeType":null,"type":2,"value":1323463505484}],"type":"text/x-moz-place-container","children":[]}]},{"index":2,"title":"Tags","id":4,"parent":1,"dateAdded":1323459897362375,"lastModified":1323459897362506,"type":"text/x-moz-place-container","root":"tagsFolder","children":[]},{"index":3,"title":"Unsorted Bookmarks","id":5,"parent":1,"dateAdded":1323459897362531,"lastModified":1323459897811953,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder","children":[]}]}
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,5 @@
|
|||
[Compatibility]
|
||||
LastVersion=8.0_20111104165243/20111104165243
|
||||
LastOSABI=Linux_x86_64-gcc3
|
||||
LastPlatformDir=/home/dkl/bin/firefox/stable
|
||||
LastAppDir=/home/dkl/bin/firefox/stable
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,4 @@
|
|||
[ExtensionDirs]
|
||||
|
||||
[ThemeDirs]
|
||||
Extension0=/home/dkl/bin/firefox/stable/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0"?>
|
||||
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#nav-bar"
|
||||
iconsize="small"
|
||||
currentset="unified-back-forward-button,urlbar-container,reload-button,stop-button,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#toolbar-menubar"
|
||||
currentset="menubar-items" />
|
||||
<RDF:Description RDF:about="about:config#lockCol"
|
||||
ordinal="3" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"
|
||||
screenX="420"
|
||||
screenY="295"
|
||||
lastSelected="paneAdvanced" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#PersonalToolbar"
|
||||
currentset="personal-bookmarks" />
|
||||
<RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"
|
||||
width="689"
|
||||
height="432" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar"
|
||||
currentset="addonbar-closebutton,spring,status-bar" />
|
||||
<RDF:Description RDF:about="about:config#valueCol"
|
||||
ordinal="7" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#navigator-toolbox"
|
||||
iconsize="small" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
|
||||
value="" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul">
|
||||
<NC:persist RDF:resource="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="about:config">
|
||||
<NC:persist RDF:resource="about:config#prefCol"/>
|
||||
<NC:persist RDF:resource="about:config#lockCol"/>
|
||||
<NC:persist RDF:resource="about:config#typeCol"/>
|
||||
<NC:persist RDF:resource="about:config#valueCol"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul">
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#navigator-toolbox"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#nav-bar"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#toolbar-menubar"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#PersonalToolbar"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#TabsToolbar"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#addon-bar"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
|
||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="about:config#typeCol"
|
||||
ordinal="5" />
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#TabsToolbar"
|
||||
currentset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton" />
|
||||
<RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul">
|
||||
<NC:persist RDF:resource="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
|
||||
width="994"
|
||||
height="986"
|
||||
screenX="0"
|
||||
screenY="26"
|
||||
sizemode="normal" />
|
||||
<RDF:Description RDF:about="about:config#prefCol"
|
||||
ordinal="1"
|
||||
sortDirection="ascending" />
|
||||
</RDF:RDF>
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0"?>
|
||||
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<RDF:Seq RDF:about="urn:schemes:root">
|
||||
<RDF:li RDF:resource="urn:scheme:mailto"/>
|
||||
<RDF:li RDF:resource="urn:scheme:irc"/>
|
||||
<RDF:li RDF:resource="urn:scheme:webcal"/>
|
||||
<RDF:li RDF:resource="urn:scheme:ircs"/>
|
||||
</RDF:Seq>
|
||||
<RDF:Description RDF:about="urn:scheme:handler:mailto"
|
||||
NC:alwaysAsk="true">
|
||||
<NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&url=%s"/>
|
||||
<NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:scheme:irc"
|
||||
NC:value="irc">
|
||||
<NC:handlerProp RDF:resource="urn:scheme:handler:irc"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:schemes">
|
||||
<NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:root"
|
||||
NC:en-US_defaultHandlersVersion="3" />
|
||||
<RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&url=%s"
|
||||
NC:prettyName="Gmail"
|
||||
NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&url=%s" />
|
||||
<RDF:Description RDF:about="urn:scheme:webcal"
|
||||
NC:value="webcal">
|
||||
<NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:handler:web:http://30boxes.com/external/widget?refer=ff&url=%s"
|
||||
NC:prettyName="30 Boxes"
|
||||
NC:uriTemplate="http://30boxes.com/external/widget?refer=ff&url=%s" />
|
||||
<RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
|
||||
NC:prettyName="Yahoo! Mail"
|
||||
NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
|
||||
<RDF:Description RDF:about="urn:scheme:handler:irc"
|
||||
NC:alwaysAsk="true">
|
||||
<NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:scheme:ircs"
|
||||
NC:value="ircs">
|
||||
<NC:handlerProp RDF:resource="urn:scheme:handler:ircs"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:handler:web:https://www.mibbit.com/?url=%s"
|
||||
NC:prettyName="Mibbit"
|
||||
NC:uriTemplate="https://www.mibbit.com/?url=%s" />
|
||||
<RDF:Description RDF:about="urn:scheme:mailto"
|
||||
NC:value="mailto">
|
||||
<NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:scheme:handler:webcal"
|
||||
NC:alwaysAsk="true">
|
||||
<NC:possibleApplication RDF:resource="urn:handler:web:http://30boxes.com/external/widget?refer=ff&url=%s"/>
|
||||
</RDF:Description>
|
||||
<RDF:Description RDF:about="urn:scheme:handler:ircs"
|
||||
NC:alwaysAsk="true">
|
||||
<NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
|
||||
</RDF:Description>
|
||||
</RDF:RDF>
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,18 @@
|
|||
Generated File. Do not edit.
|
||||
|
||||
[HEADER]
|
||||
Version:0.15:$
|
||||
Arch:x86_64-gcc3:$
|
||||
|
||||
[PLUGINS]
|
||||
libflashplayer.so:$
|
||||
/home/dkl/.mozilla/plugins/libflashplayer.so:$
|
||||
:$
|
||||
1321373997000:1:1:$
|
||||
Shockwave Flash 11.1 r102:$
|
||||
Shockwave Flash:$
|
||||
2
|
||||
0:application/x-shockwave-flash:Shockwave Flash:swf:$
|
||||
1:application/futuresplash:FutureSplash Player:spl:$
|
||||
|
||||
[INVALID]
|
|
@ -0,0 +1,59 @@
|
|||
# Mozilla User Preferences
|
||||
|
||||
/* Do not edit this file.
|
||||
*
|
||||
* If you make changes to this file while the application is running,
|
||||
* the changes will be overwritten when the application exits.
|
||||
*
|
||||
* To make a manual change to preferences, you can visit the URL about:config
|
||||
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
|
||||
*/
|
||||
|
||||
user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1323460017);
|
||||
user_pref("app.update.lastUpdateTime.background-update-timer", 1323460017);
|
||||
user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1323460017);
|
||||
user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1323460017);
|
||||
user_pref("app.update.mode", 0);
|
||||
user_pref("browser.bookmarks.restore_default_bookmarks", false);
|
||||
user_pref("browser.cache.disk.capacity", 1048576);
|
||||
user_pref("browser.cache.disk.smart_size.first_run", false);
|
||||
user_pref("browser.cache.disk.smart_size_cached_value", 1048576);
|
||||
user_pref("browser.download.manager.retention", 0);
|
||||
user_pref("browser.formfill.enable", false);
|
||||
user_pref("browser.link.open_newwindow", 2);
|
||||
user_pref("browser.migration.version", 5);
|
||||
user_pref("browser.places.smartBookmarksVersion", 2);
|
||||
user_pref("browser.preferences.advanced.selectedTabIndex", 0);
|
||||
user_pref("browser.rights.3.shown", true);
|
||||
user_pref("browser.safebrowsing.enabled", false);
|
||||
user_pref("browser.safebrowsing.malware.enabled", false);
|
||||
user_pref("browser.search.update", false);
|
||||
user_pref("browser.startup.homepage_override.buildID", "20111104165243");
|
||||
user_pref("browser.startup.homepage_override.mstone", "rv:8.0");
|
||||
user_pref("browser.startup.page", 0);
|
||||
user_pref("browser.tabs.autoHide", true);
|
||||
user_pref("browser.tabs.warnOnClose", false);
|
||||
user_pref("browser.tabs.warnOnOpen", false);
|
||||
user_pref("dom.disable_open_during_load", false);
|
||||
user_pref("extensions.blocklist.pingCountVersion", 0);
|
||||
user_pref("extensions.bootstrappedAddons", "{}");
|
||||
user_pref("extensions.databaseSchema", 6);
|
||||
user_pref("extensions.enabledAddons", "{972ce4c6-7e08-4474-a285-3208198ce6fd}:8.0");
|
||||
user_pref("extensions.installCache", "[{\"name\":\"app-global\",\"addons\":{\"{972ce4c6-7e08-4474-a285-3208198ce6fd}\":{\"descriptor\":\"/home/dkl/bin/firefox/stable/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}\",\"mtime\":1320465153000}}}]");
|
||||
user_pref("extensions.lastAppVersion", "8.0");
|
||||
user_pref("extensions.lastPlatformVersion", "8.0");
|
||||
user_pref("extensions.newAddons", false);
|
||||
user_pref("extensions.pendingOperations", false);
|
||||
user_pref("extensions.shownSelectionUI", true);
|
||||
user_pref("extensions.update.notifyUser", false);
|
||||
user_pref("intl.charsetmenu.browser.cache", "UTF-8");
|
||||
user_pref("network.cookie.prefsMigrated", true);
|
||||
user_pref("places.history.enabled", false);
|
||||
user_pref("places.history.expiration.transient_current_max_pages", 116188);
|
||||
user_pref("privacy.sanitize.migrateFx3Prefs", true);
|
||||
user_pref("signon.rememberSignons", false);
|
||||
user_pref("toolkit.telemetry.prompted", true);
|
||||
user_pref("urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/newkey", 1326051901);
|
||||
user_pref("xpinstall.whitelist.add", "");
|
||||
user_pref("xpinstall.whitelist.add.36", "");
|
||||
user_pref("xpinstall.whitelist.required", false);
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1 @@
|
|||
{"windows":[{"tabs":[{"entries":[{"url":"http://www.mozilla.org/en-US/firefox/8.0/firstrun/","title":"Welcome to Firefox","ID":1,"docshellID":5,"docIdentifier":1},{"url":"about:config","ID":2,"docshellID":5,"owner_b64":"SmIS26zLEdO3ZQBgsLbOywAAAAAAAAAAwAAAAAAAAEY=","docIdentifier":2,"scroll":"0,0","formdata":{"#textbox":""}}],"index":2,"hidden":false,"attributes":{}}],"selected":1,"_closedTabs":[{"state":{"entries":[{"url":"about:home","title":"Mozilla Firefox Start Page","ID":0,"docshellID":6,"owner_b64":"NhAra3tiRRqhyKDUVsktxQAAAAAAAAAAwAAAAAAAAEYAAQAAAAAAAS8nfAAOr03buTZBMmukiq45X+BFfRhK26P9r5jIoa8RAAAAAAVhYm91dAAAAARob21lAODaHXAvexHTjNAAYLD8FKM5X+BFfRhK26P9r5jIoa8RAAAAAA5tb3otc2FmZS1hYm91dAAAAARob21lAAAAAA==","docIdentifier":0,"formdata":{},"scroll":"0,0"}],"index":1,"hidden":false,"attributes":{"image":"chrome://branding/content/icon16.png"}},"title":"Mozilla Firefox Start Page","image":"chrome://branding/content/icon16.png","pos":1}],"busy":false,"width":994,"height":986,"screenX":0,"screenY":26,"sizemode":"normal"}],"selectedWindow":1,"_closedWindows":[],"session":{"state":"stopped","lastUpdate":1323460018422,"startTime":1323459899938}}
|
|
@ -0,0 +1 @@
|
|||
{"windows":[{"tabs":[{"entries":[],"hidden":false,"attributes":{}}],"selected":1,"_closedTabs":[],"busy":false,"width":994,"height":986,"screenX":0,"screenY":26,"sizemode":"normal"}],"selectedWindow":0,"_closedWindows":[],"session":{"state":"stopped","lastUpdate":1323460027460,"startTime":1323460022105}}
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,2 @@
|
|||
clientkey:24:hjaJkPFig7BqRteWRE2SRg==
|
||||
wrappedkey:100:AKEgNiusBlqNUroZJYMewdsDv882ORFBLUrBHzttgXvbwqllCXm86fbbFavgllVgdZJxQk8iqKI6dyl6uWuCiHNwAEpce9Ts5Q==
|
Двоичный файл не отображается.
|
@ -0,0 +1,73 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 12;
|
||||
|
||||
# Start the Xvfb server first
|
||||
my ($pid, $display) = xserver_start();
|
||||
ok($pid && $display, "X Server started with PID $pid on display :$display");
|
||||
ok(open(XPID, ">testing.x.pid"), "Opening testing.x.pid");
|
||||
ok((print XPID $pid), "Writing testing.x.pid");
|
||||
ok(close(XPID), "Closing testing.x.pid");
|
||||
|
||||
# Start the VNC service second
|
||||
ok($pid = vnc_start($display), "VNC desktop started with PID $pid");
|
||||
ok(open(VNCPID, ">testing.vnc.pid"), "Opening testing.vnc.pid");
|
||||
ok((print VNCPID $pid), "Writing testing.vnc.pid");
|
||||
ok(close(VNCPID), "Closing testing.vnc.pid");
|
||||
|
||||
# Start the selenium server third
|
||||
ok($pid = selenium_start($display), "Selenium RC server started with PID $pid");
|
||||
ok(open(SPID, ">testing.selenium.pid"), "Opening testing.selenium.pid");
|
||||
ok((print SPID $pid), "Writing testing.selenium.pid");
|
||||
ok(close(SPID), "Closing testing.selenium.pid");
|
||||
|
||||
sleep(10);
|
||||
|
||||
# Subroutines
|
||||
|
||||
sub xserver_start {
|
||||
my $pid;
|
||||
foreach my $display (1..3) {
|
||||
my @x_cmd = qw(Xvfb -ac -screen 0 1600x1200x24 -fbdir /tmp);
|
||||
push(@x_cmd, ":$display");
|
||||
$pid = fork();
|
||||
if (!$pid) {
|
||||
open(STDOUT, ">/dev/null");
|
||||
open(STDERR, ">/dev/null");
|
||||
exec(@x_cmd) || die "unable to execute: $!";
|
||||
}
|
||||
else {
|
||||
return ($pid, $display);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub vnc_start {
|
||||
my $display = shift;
|
||||
my @vnc_cmd = qw(x11vnc -viewonly -forever -nopw -quiet -display);
|
||||
push(@vnc_cmd, ":$display");
|
||||
my $pid = fork();
|
||||
if (!$pid) {
|
||||
open(STDOUT, ">/dev/null");
|
||||
open(STDERR, ">/dev/null");
|
||||
exec(@vnc_cmd) || die "unabled to execute: $!";
|
||||
}
|
||||
return $pid;
|
||||
}
|
||||
|
||||
sub selenium_start {
|
||||
my $display = shift;
|
||||
my @selenium_cmd = qw(java -jar ../config/selenium-server-standalone.jar
|
||||
-firefoxProfileTemplate ../config/firefox
|
||||
-log ../config/selenium.log);
|
||||
unshift(@selenium_cmd, "env", "DISPLAY=:$display");
|
||||
my $pid = fork();
|
||||
if (!$pid) {
|
||||
open(STDOUT, ">/dev/null");
|
||||
open(STDERR, ">/dev/null");
|
||||
exec(@selenium_cmd) || die "unable to execute: $!";
|
||||
}
|
||||
return $pid;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 15;
|
||||
|
||||
my $pid;
|
||||
|
||||
# Stop the selenium server first
|
||||
ok(open(SPID, "<testing.selenium.pid"), "Opening testing.selenium.pid");
|
||||
ok(($pid = <SPID>), "Reading testing.selenium.pid");
|
||||
ok(close(SPID), "Closing testing.selenium.pid");
|
||||
ok(kill(9, $pid), "Killing process $pid");
|
||||
ok(unlink("testing.selenium.pid"), "Removing testing.selenium.pid");
|
||||
|
||||
# Stop the VNC service second
|
||||
ok(open(VNCPID, "<testing.vnc.pid"), "Opening testing.vnc.pid");
|
||||
ok(($pid = <VNCPID>), "Reading testing.vnc.pid");
|
||||
ok(close(VNCPID), "Closing testing.vnc.pid");
|
||||
ok(kill(9, $pid), "Killing process $pid");
|
||||
ok(unlink("testing.vnc.pid"), "Removing testing.vnc.pid");
|
||||
|
||||
# Stop the Xvfb server third
|
||||
ok(open(XPID, "<testing.x.pid"), "Opening testing.x.pid");
|
||||
ok(($pid = <XPID>), "Reading testing.x.pid");
|
||||
ok(close(XPID), "Closing testing.x.pid");
|
||||
ok(kill(9, $pid), "Killing process $pid");
|
||||
ok(unlink("testing.x.pid"), "Removing testing.x.pid");
|
Загрузка…
Ссылка в новой задаче