[gnome-continuous/wip/applications-testing: 2/2] it works



commit 8fccce02babfc318a0f0310d7dfe54867e154f51
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 25 19:50:10 2013 -0400

    it works

 src/js/tasks/testbase.js                 |   13 +++++++------
 src/tests/gnome-continuous-startstopapps |    4 +++-
 2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index 85232bb..d8518d6 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -56,12 +56,11 @@ const CommandSocketProxy = new Lang.Class({
 
     _init: function(connection,
                     asyncMessageHandler,
-                    screenshotHandler,
-                    saveFileHandler) {
+                    screenshotHandler) {
         this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(CommandSocketIface, this);
         this._dbusImpl.export(connection, '/org/gnome/Continuous/Command');
         this._asyncMessageHandler = asyncMessageHandler;
-        this._saveFileHandler = saveFileHandler;
+        this._screenshotHandler = screenshotHandler;
         this._savingFiles = {};
     },
 
@@ -283,12 +282,14 @@ const TestOneDisk = new Lang.Class({
         if (name == null) {
             this._requestingScreenshot = false;
         } else {
-            this._commandProxy.emit_signal('ScreenshotComplete',
-                                           GLib.Variant.new('(s)', [name]));
+            this._commandProxy._dbusImpl.emit_signal('ScreenshotComplete',
+                                                     GLib.Variant.new('(s)', [name]));
         }
 
-        if (isFinal)
+        if (isFinal) {
+            print("Final screenshot complete");
             this._loop.quit();
+        }
     },
 
     _screenshot: function(params) {
diff --git a/src/tests/gnome-continuous-startstopapps b/src/tests/gnome-continuous-startstopapps
index 8460624..8c00a37 100644
--- a/src/tests/gnome-continuous-startstopapps
+++ b/src/tests/gnome-continuous-startstopapps
@@ -55,6 +55,7 @@ const StartStopApps = new GObject.Class({
                return false;
            return true;
        });
+       print("" + this._appList.length + " apps to test");
        this._testingApp = null;
        
        this._testNextApp();
@@ -75,7 +76,7 @@ const StartStopApps = new GObject.Class({
        this._shellEval(CLOSE_ALL_APPS, this._cancellable);
 
        this._sendAsyncMessage('TestingAppStart', GLib.Variant.new("s", appid));
-       this._testingApp.launch([], cancellable);
+       this._testingApp.launch([], this._cancellable);
        this._appCheckRunningIterations = 0;
        this._appCheckRunningTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1,
                                                                  Lang.bind(this, 
this._checkAppRunningTimeout));
@@ -97,6 +98,7 @@ const StartStopApps = new GObject.Class({
            return false;
        }
 
+       let runningApps = this._shellEval(GET_APP_IDS, this._cancellable);
        for (let i = 0; i < runningApps.length; i++) {
            if (runningApps[i] != appid) {
                print("WARNING: Unexpected application running: " + runningApps[i]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]