Skip to content
Permalink
Browse files

Merge branch 't/13916'

  • Loading branch information
mlewand committed Feb 2, 2016
2 parents 8761a51 + cc1b907 commit 26a9fb2c6fe77e88f67a486a715c5e4b1547c10f
Showing with 3 additions and 11 deletions.
  1. +3 −11 tests/core/selection/fake.js
@@ -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() {

0 comments on commit 26a9fb2

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