Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sculpt0r committed Nov 23, 2020
1 parent 75f84ce commit 997aa01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
4 changes: 2 additions & 2 deletions plugins/autogrow/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
if ( newHeight != currentHeight && lastHeight != newHeight ) {
newHeight = editor.fire( 'autoGrow', { currentHeight: currentHeight, newHeight: newHeight } ).newHeight;

var boxSizing = editor.container.getComputedStyle( 'box-sizing' );
var isBorderBox = boxSizing === 'border-box';
var boxSizingType = editor.container.getComputedStyle( 'box-sizing' );
var isBorderBox = boxSizingType === 'border-box';

var width = editor.container.getSize( 'width', isBorderBox );

Expand Down
27 changes: 20 additions & 7 deletions tests/plugins/autogrow/autogrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
config: {
width: width
}
}, function(bot){
}, function( bot ) {
bot.setData( autogrowTools.getTestContent( paragraphs ), function() {
var editor = bot.editor;
var initialEditorSize = autogrowTools.getEditorSize( editor );

editor.once( 'afterCommandExec', function() {
resume( function name( params ) {
var editorSize = autogrowTools.getEditorSize( editor );
Expand All @@ -36,17 +37,29 @@

bender.test( {
// (#4372)
'test autogrow for editor width 200%': function() { bender.createEditor('200%', 6); },
'test autogrow for editor width 200%': function() {
bender.createEditor( '200%', 6 );
},
// (#4372)
'test autogrow for editor width 20em': function() { bender.createEditor('20em', 6); },
'test autogrow for editor width 20em': function() {
bender.createEditor( '20em', 6 );
},
// (#4372)
'test autogrow for editor width 200px': function() { bender.createEditor('200px', 6); },
'test autogrow for editor width 200px': function() {
bender.createEditor( '200px', 6 );
},
// (#4372)
'test autogrow for editor width 200': function() { bender.createEditor(200, 6); },
'test autogrow for editor width 200': function() {
bender.createEditor( 200, 6 );
},
// (#4372)
'test autogrow for editor width 0': function() { bender.createEditor(0, 6); },
'test autogrow for editor width 0': function() {
bender.createEditor( 0, 6 );
},
// (#4372)
'test autogrow for editor width auto': function() { bender.createEditor('auto', 6); },
'test autogrow for editor width auto': function() {
bender.createEditor( 'auto', 6 );
},
// (#4286)
'test autogrow': function() {
if ( bender.env.ie && bender.env.version < 9 ) {
Expand Down

0 comments on commit 997aa01

Please sign in to comment.