Commit 2066b06a authored by Alive Kuo's avatar Alive Kuo
Browse files

Bug 941238 - Resume background apps by default

parent 553f7969
Loading
Loading
Loading
Loading
+3 −0
Changes for apps/system/js/app_window.js: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -846,6 +846,9 @@
      if (this.constructor.SUSPENDING_ENABLED && !this.isActive()) {
        this.debug(' ..sleep! I will come back.');
        this.destroyBrowser();
        if (this.frontWindow) {
          this.frontWindow.kill();
        }
      } else {
        this.kill(evt);
      }
+6 −1
Changes for apps/system/test/unit/app_window_test.js: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1309,9 +1309,13 @@ suite('system/AppWindow', function() {
    test('Destroy only the browser when app crashed and ' +
          'suspending is enabled',
      function() {
        var app1 = new AppWindow(fakeAppConfig1);
        var apps = openPopups(2);
        var app1 = apps[0];
        var popup1 = apps[1];
        var stubKill = this.sinon.stub(popup1, 'kill');
        var stubDestroyBrowser = this.sinon.stub(app1, 'destroyBrowser');
        var stubIsActive = this.sinon.stub(app1, 'isActive');

        stubIsActive.returns(false);
        AppWindow.SUSPENDING_ENABLED = true;
        app1.handleEvent({
@@ -1322,6 +1326,7 @@ suite('system/AppWindow', function() {
        });

        assert.isTrue(stubDestroyBrowser.called);
        assert.isTrue(stubKill.called);
        AppWindow.SUSPENDING_ENABLED = false;
      });

+1 −1
Changes for build/config/common-settings.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
   "alarm.enabled": false,
   "app-transition.enabled": true,
   "app.cards_view.screenshots.enabled": true,
   "app-suspending.enabled": false,
   "app-suspending.enabled": true,
   "app-themecolor.enabled": true,
   "app.launch_path.blacklist": [],
   "app.reportCrashes": "ask",