anchor.diff:          spark.showMessage('Push Failure', e.toString());
         }
       }).whenComplete(() {
  -      progressComponent.visible = false;
  -      _deployDeviceMessage.style.visibility = 'hidden';
  -      _deployButton.enabled = true;
  -      _deployButton.deliverChanges();
  -    });
  +      _toggleProgressVisible(false);
  +    });
  +  }
  +
  +  void _toggleProgressVisible(bool visible) {
  +    SparkProgress progressComponent = getElement('#deployProgress');
  +    progressComponent.visible = visible;
  +    progressComponent.deliverChanges();
  +
  +    _deployDeviceMessage.style.visibility = visible ? 'visible' : 'hidden';
  +
  +    _deployButton.enabled = !visible;
  +    _deployButton.deliverChanges();
     }
   }
   
  
positive.code: 
    void _commit() {
      SparkProgress progressComponent = getElement('#deployProgress');
      progressComponent.visible = true;
      progressComponent.progressMessage = "Deploying...";
      progressComponent.deliverChanges();
  
      _deployDeviceMessage.style.visibility = 'visible';
  
      _deployButton.enabled = false;
      _deployButton.deliverChanges();
  
      ProgressMonitor monitor = new ProgressMonitorImpl(progressComponent);
  
  
negative.code:           'Unable to deploy the current selection; please select a Chrome App '
            'to deploy.');
      } else {
        _toggleProgressVisible(false);
        _show();
      }
    }
  