Skip to content

Commit

Permalink
Merge branch 't/13916'
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Feb 2, 2016
2 parents 8761a51 + cc1b907 commit 26a9fb2
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/core/selection/fake.js
Expand Up @@ -271,23 +271,15 @@ bender.test( {

var sel = this.editor.getSelection(),
bookmarks = sel.createBookmarks2(),
selectRangesSpy = sinon.spy( sel, 'selectRanges' );

if ( window.console ) {
// Override to avoid logging the CKE's warning about selection not being fake any more,
// so the console stays clean when the test passes.
var consoleLogSpy = sinon.stub( window.console, 'log' );
}
selectRangesSpy = sinon.spy( sel, 'selectRanges' ),
warnStub = sinon.stub( CKEDITOR, 'warn' );

bookmarks.isFake = 1;
sel.selectBookmarks( bookmarks );
warnStub.restore();

assert.isTrue( selectRangesSpy.calledOnce );
assert.isFalse( !!sel.isFake, 'isFake is reset' );

if ( consoleLogSpy ) {
consoleLogSpy.restore();
}
},

'Fake-selection bookmark (serializable)': function() {
Expand Down

0 comments on commit 26a9fb2

Please sign in to comment.