Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "Bug 1039955 - Fix direct circular activity by closing front w…
Browse files Browse the repository at this point in the history
…indows"

This reverts commit b75c7fd.
  • Loading branch information
rvandermeulen committed Aug 29, 2014
1 parent b75c7fd commit e466549
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
8 changes: 2 additions & 6 deletions apps/system/js/app_window_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,12 +656,8 @@
var caller;
var callee = this.getApp(config.origin);
caller = this._activeApp.getTopMostWindow();
if (caller.getBottomMostWindow() === callee) {
callee.frontWindow.kill();
} else {
callee.callerWindow = caller;
caller.calleeWindow = callee;
}
callee.callerWindow = caller;
caller.calleeWindow = callee;
},

debug: function awm_debug() {
Expand Down
20 changes: 1 addition & 19 deletions apps/system/test/unit/app_window_manager_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ suite('system/AppWindowManager', function() {
// callee is app7, caller is app2
injectRunningApps(app7);
AppWindowManager._activeApp = app1;
fakeAppConfig.parentApp = '';
this.sinon.stub(app1, 'getTopMostWindow').returns(app2);

AppWindowManager.linkWindowActivity(fakeAppConfig);
Expand All @@ -766,25 +767,6 @@ suite('system/AppWindowManager', function() {
assert.deepEqual(app7.callerWindow, app2);
assert.isFalse(homescreenLauncher.getHomescreen.called);
});

test('If there is a direct circular activity, ' +
'close the frontwindow to reveal the callee',
function() {
// callee is app1, caller is app3(a front window)
injectRunningApps(app1);
AppWindowManager._activeApp = app1;
fakeAppConfig.parentApp = '';
app1.frontWindow = app3;
this.sinon.stub(app1, 'getTopMostWindow').returns(app3);
this.sinon.stub(app3, 'getBottomMostWindow').returns(app1);
var stubKill = this.sinon.stub(app3, 'kill');

AppWindowManager.linkWindowActivity(fakeAppConfig1);

assert.isTrue(stubKill.called);
assert.isUndefined(app1.callerWindow);
app1.frontWindow = null;
});
});

test('getApp', function() {
Expand Down

0 comments on commit e466549

Please sign in to comment.