Updates to various things to make the basic animation test work

This commit is contained in:
William Lachance 2011-10-14 13:28:25 -04:00
Родитель ee6831fa11
Коммит 55a27a403e
5 изменённых файлов: 32 добавлений и 23 удалений

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

@ -39,10 +39,11 @@
set -e
export PATH=$(dirname $0):$PATH
BINDIR=$(dirname $0)
TALOS_DIR=$(dirname $0)/../src/talos
source $BINDIR/activate
if [ $# -ne 3 ]
then
echo "Usage: `basename $0` <device ip> <webserver path> <fennec appname>"
@ -54,7 +55,7 @@ WEBSERVER_ADDRESS=$2
FENNEC_APP=$3
cd $TALOS_DIR && python remotePerfConfigurator.py -v -e $FENNEC_APP \
--activeTests ts --sampleConfig remote-videocapture.config --noChrome \
--activeTests tcolorcycle --sampleConfig remote.config --noChrome \
--resultsServer ' ' --resultsLink ' ' \
--videoCapture \
--remoteDevice=$DEVICE_IP \

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

@ -49,6 +49,9 @@ git submodule update
virtualenv .
./bin/easy_install $PYPI_DEPS
# Build up videocapture utility (FIXME: should be part of the egg building process)
make -C src/videocapture/videocapture/decklink
# Install videocapture and jsbridge python eggs (and their deps)
./bin/easy_install src/videocapture
./bin/easy_install src/mozmill/mozrunner
@ -61,6 +64,10 @@ hg clone http://hg.mozilla.org/build/pageloader \
hg clone http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark \
$TALOS_EXTENSION_DIR/bench@taras.glek
# Link to local extensions required by talos videocapture
ln -sf src/ffx-extension $TALOS_EXTENSION_DIR/eideticker-controller@mozilla.com/
ln -sf src/mozmill/jsbridge/jsbridge/extension $TALOS_EXTENSION_DIR/jsbridge@mozilla.com/
# Install mobile tp4 pageset
wget http://people.mozilla.org/~jmaher/mobile_tp4.zip -O downloads/mobile_tp4.zip
unzip -o downloads/mobile_tp4.zip -d src/talos/page_load_test
unzip -o downloads/mobile_tp4.zip -d src/talos/page_load_test

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

@ -1,13 +1,13 @@
function EController() {
function Eideticker() {
}
EController.prototype = {
toString: function() { return "[EController]"; },
Eideticker.prototype = {
toString: function() { return "[Eideticker]"; },
pageLoaded: function() {
sendAsyncMessage('EController.PageLoaded', { });
sendAsyncMessage('Eideticker.PageLoaded', { });
},
animationFinished: function() {
sendAsyncMessage('EController.AnimationFinished', { });
sendAsyncMessage('Eideticker.AnimationFinished', { });
},
__exposedProps__: {
'toString': 'r',
@ -21,22 +21,22 @@ EController.prototype = {
// the DOMWindowCreated event to be notified about content windows
// being created in this context.
function EControllerManager() {
function EidetickerManager() {
addEventListener("DOMWindowCreated", this, false);
}
EControllerManager.prototype = {
EidetickerManager.prototype = {
handleEvent: function handleEvent(aEvent) {
var window = aEvent.target.defaultView;
window.wrappedJSObject.EController = new EController(window);
window.wrappedJSObject.Eideticker = new Eideticker(window);
}
};
var eidetickerControllerManager = new EControllerManager();
var eidetickerControllerManager = new EidetickerManager();
// Register for any messages our API needs us to handle
addMessageListener("Eideticker.StartAnimation", function(obj) {
if (content.wrappedJSObject.startAnimationCb) {
content.wrappedJSObject.startAnimationCb();
if (content.wrappedJSObject.startAnimation) {
content.wrappedJSObject.startAnimation();
}
});

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

@ -8,21 +8,21 @@ Cu.import("resource://gre/modules/Services.jsm");
var jsbridge = {}; Cu.import('resource://jsbridge/modules/events.js', jsbridge);
/* XPCOM gunk */
function EControllerObserver() {}
function EidetickerObserver() {}
function myDump(aMessage) {
var consoleService = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService);
consoleService.logStringMessage("EController: " + aMessage);
consoleService.logStringMessage("Eideticker: " + aMessage);
}
EControllerObserver.prototype = {
EidetickerObserver.prototype = {
classDescription: "Eideticker Controller Observer for use in testing.",
classID: Components.ID("{67a4936d-ce4c-4090-86f5-8a52ea173c5f}"),
contractID: "@mozilla.org/eideticker-controller-observer;1",
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
_xpcom_categories: [{category: "profile-after-change", service: true }],
isFrameScriptLoaded: false,
observe: function(aSubject, aTopic, aData)
{
if (aTopic == "profile-after-change") {
@ -31,8 +31,8 @@ EControllerObserver.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("EController.PageLoaded", this);
messageManager.addMessageListener("EController.AnimationFinished", this);
messageManager.addMessageListener("Eideticker.PageLoaded", this);
messageManager.addMessageListener("Eideticker.AnimationFinished", this);
messageManager.loadFrameScript("chrome://eideticker-controller/content/contentscript.js", true);
this.isFrameScriptLoaded = true;
@ -53,8 +53,9 @@ EControllerObserver.prototype = {
},
receiveMessage: function(aMessage) {
myDump("Proxing message");
jsbridge.fireEvent(aMessage.name, {});
}
};
const NSGetFactory = XPCOMUtils.generateNSGetFactory([EControllerObserver]);
const NSGetFactory = XPCOMUtils.generateNSGetFactory([EidetickerObserver]);

@ -1 +1 @@
Subproject commit 9854116dc995b64ac9ea986a8e6db8b046b91519
Subproject commit 72645f2ad700ec5a1273bcbd3204ee2a50d12f51