From 3a84fa3dfdec3fb5f1463466d41510223fb9b18d Mon Sep 17 00:00:00 2001 From: Alive Kuo Date: Thu, 28 May 2015 10:42:30 +0800 Subject: [PATCH] Bug 1169122 - Change the way to reference AppWindowManager. r=jgriffin --- .../marionette/client/marionette/marionette_test.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/testing/marionette/client/marionette/marionette_test.py b/testing/marionette/client/marionette/marionette_test.py index ba882c811fba..7fcd8f978501 100644 --- a/testing/marionette/client/marionette/marionette_test.py +++ b/testing/marionette/client/marionette/marionette_test.py @@ -474,13 +474,11 @@ setReq.onsuccess = function() { for (let i = 0; i < apps.length; i++) { let app = apps[i]; if (app.manifest.name === 'Test Container') { - let manager = window.wrappedJSObject.appWindowManager || window.wrappedJSObject.AppWindowManager; - if (!manager) { + window.wrappedJSObject.Service.request('AppWindowManager:kill', app.origin).then(function() { + marionetteScriptFinished(true); + }).catch(function() { marionetteScriptFinished(false); - return; - } - manager.kill(app.origin); - marionetteScriptFinished(true); + }); return; } }