From: Kevin Sawicki Date: Tue, 19 Jan 2016 18:57:18 +0000 (-0800) Subject: Add failing spec X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c719b252cb154e73673deed3f760883a9f60a7c7;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add failing spec --- diff --git a/spec/api-desktop-capturer-spec.js b/spec/api-desktop-capturer-spec.js index 13c6f9e..85f3f19 100644 --- a/spec/api-desktop-capturer-spec.js +++ b/spec/api-desktop-capturer-spec.js @@ -11,4 +11,17 @@ describe('desktopCapturer', function() { done(); }); }); + + it('does not throw an error when called twice (regression)', function(done) { + var callCount = 0; + var callback = function(error, sources) { + callCount++; + assert.equal(error, null); + assert.notEqual(sources.length, 0); + if (callCount === 2) done(); + } + + desktopCapturer.getSources({types: ['window', 'screen']}, callback); + desktopCapturer.getSources({types: ['window', 'screen']}, callback); + }) });