Skip to content
Permalink
Browse files

Bug 1162384 - [NFC] Cannot share image which is opened from notificat…

…ion, r=alive
  • Loading branch information...
cctuan authored and rvandermeulen committed May 13, 2015
1 parent 922131e commit e6107c745068cf6fbf23494f9d17c1a1fa335865
Showing with 12 additions and 3 deletions.
  1. +2 −3 apps/system/js/app_window.js
  2. +10 −0 apps/system/test/unit/app_window_test.js
@@ -1242,12 +1242,11 @@
AppWindow.prototype._showScreenshotOverlay =
function aw__showScreenshotOverlay() {
if (this.frontWindow && this.frontWindow.isActive()) {
this.frontWindow._showScreenshotOverlay();
return;
return this.frontWindow._showScreenshotOverlay();
}
if (!this.screenshotOverlay ||
this.screenshotOverlay.classList.contains('visible')) {
return;
return Promise.resolve();
}
if (this.identificationOverlay) {
this.element.classList.add('overlay');
@@ -730,6 +730,16 @@ suite('system/AppWindow', function() {
assert.isFalse(app2.screenshotOverlay.classList.contains('visible'));
});

test('should return promise and resolve directly if the frontest app is' +
' active and its screenshot is visible', function(done) {
app1.frontWindow = app2;
this.sinon.stub(app2, 'isActive').returns(true);
app2.screenshotOverlay.classList.add('visible');
app1._showScreenshotOverlay().then(() => {
done();
});
});

test('hideScreenshotOverlay', function() {
app1.screenshotOverlay.classList.add('visible');
app1.element.classList.add('overlay');

0 comments on commit e6107c7

Please sign in to comment.
You can’t perform that action at this time.