A bunch of changes to support a new "new york times" pageloader test

Very much W.I.P.
This commit is contained in:
William Lachance 2011-10-26 09:52:08 -04:00
Родитель 11ca2f0717
Коммит d0b4ab0045
7 изменённых файлов: 57 добавлений и 23 удалений

Просмотреть файл

@ -47,9 +47,15 @@ kill_bcontrollers () {
done
}
TEST=$1
BINDIR=$(dirname $0)
TALOS_DIR=$(dirname $0)/../src/talos
if [ ! $TEST ]; then
echo "Must specify a valid test name!"
exit 1
fi
source $BINDIR/activate
# Kill any current bcontroller processes and set up a trap on exit to do the
@ -57,4 +63,4 @@ source $BINDIR/activate
kill_bcontrollers
trap kill_bcontrollers INT TERM EXIT
cd $TALOS_DIR && python run_tests.py -d -n eideticker.config
cd $TALOS_DIR && python run_tests.py -d -n eideticker-$TEST.config

Просмотреть файл

@ -44,20 +44,25 @@ TALOS_DIR=$(dirname $0)/../src/talos
source $BINDIR/activate
if [ $# -ne 3 ]
if [ $# -ne 4 ]
then
echo "Usage: `basename $0` <device ip> <webserver path> <fennec appname>"
echo "Usage: `basename $0` <testname> <device ip> <webserver path> <fennec appname>"
echo
echo "Where testname is one of 'tnytimes' or 'tcolorcycle'"
echo
exit 1
fi
DEVICE_IP=$1
WEBSERVER_ADDRESS=$2
FENNEC_APP=$3
TEST=$1
DEVICE_IP=$2
WEBSERVER_ADDRESS=$3
FENNEC_APP=$4
cd $TALOS_DIR && python remotePerfConfigurator.py -v -e $FENNEC_APP \
--activeTests tcolorcycle --sampleConfig remote.config --noChrome \
cd $TALOS_DIR
python remotePerfConfigurator.py -v -e $FENNEC_APP \
--activeTests $TEST --sampleConfig remote.config --noChrome \
--resultsServer ' ' --resultsLink ' ' \
--videoCapture \
--remoteDevice=$DEVICE_IP \
--webServer $WEBSERVER_ADDRESS \
--output eideticker.config
--output eideticker-$TEST.config

Просмотреть файл

@ -4,15 +4,15 @@ function Eideticker() {
Eideticker.prototype = {
toString: function() { return "[Eideticker]"; },
pageLoaded: function() {
sendAsyncMessage('Eideticker.PageLoaded', { });
sendAsyncMessage('Eideticker.Ready', { });
},
animationFinished: function() {
sendAsyncMessage('Eideticker.AnimationFinished', { });
finished: function() {
sendAsyncMessage('Eideticker.Finished', { });
},
__exposedProps__: {
'toString': 'r',
'pageLoaded': 'r',
'animationFinished': 'r'
'finished': 'r'
}
};
@ -35,8 +35,8 @@ EidetickerManager.prototype = {
var eidetickerControllerManager = new EidetickerManager();
// Register for any messages our API needs us to handle
addMessageListener("Eideticker.StartAnimation", function(obj) {
if (content.wrappedJSObject.startAnimation) {
content.wrappedJSObject.startAnimation();
addMessageListener("Eideticker.StartedRecording", function(obj) {
if (content.wrappedJSObject.startedRecording) {
content.wrappedJSObject.startedRecording();
}
});

Просмотреть файл

@ -31,8 +31,9 @@ EidetickerObserver.prototype = {
aTopic == "chrome-document-global-created") {
var messageManager = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIChromeFrameMessageManager);
// Register for any messages our API needs us to handle
messageManager.addMessageListener("Eideticker.PageLoaded", this);
messageManager.addMessageListener("Eideticker.AnimationFinished", this);
messageManager.addMessageListener("Eideticker.Ready", this);
messageManager.addMessageListener("Eideticker.Finished", this);
myDump("Loaded message listeners!!");
messageManager.loadFrameScript("chrome://eideticker-controller/content/contentscript.js", true);
this.isFrameScriptLoaded = true;

Просмотреть файл

@ -16,7 +16,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.5</em:minVersion>
<em:maxVersion>10.*</em:maxVersion>
<em:maxVersion>9.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:targetApplication>

Просмотреть файл

@ -35,7 +35,7 @@
//
// ***** END LICENSE BLOCK *****
var EXPORTED_SYMBOLS = [ "startAnimation" ];
var EXPORTED_SYMBOLS = [ "startedRecording", "ready", "finished", "setStartRecordingCallback" ];
const Cu = Components.utils;
const Cc = Components.classes;
@ -44,7 +44,29 @@ const Ci = Components.interfaces;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
function startAnimation () {
var jsbridge = {}; Cu.import('resource://jsbridge/modules/events.js', jsbridge);
var startRecordingCb = null;
function startedRecording () {
// sometimes we want to trigger a start recording callback in content (where
// we use the message manager), other times we want to do that in chrome
var messageManager = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIChromeFrameMessageManager);
messageManager.sendAsyncMessage('Eideticker.StartAnimation', {});
messageManager.sendAsyncMessage('Eideticker.StartedRecording', {});
if (startRecordingCb) {
startRecordingCb();
}
}
function ready () {
jsbridge.fireEvent("Eideticker.Ready", {});
}
function finished () {
jsbridge.fireEvent("Eideticker.Finished", {});
}
function setStartRecordingCallback (f) {
startRecordingCb = f;
}

@ -1 +1 @@
Subproject commit a021f53a2f8fee068f977d1d71caab8ff682201e
Subproject commit fff28fd57f0b0576309c3894647ff3dc44e1afe7