|
@@ -21,6 +21,9 @@ import RootElement from '@ckeditor/ckeditor5-engine/src/model/rootelement';
|
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
|
|
|
|
|
|
|
|
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
|
|
|
|
|
+import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
|
|
|
|
|
+
|
|
|
describe( 'InlineEditor', () => {
|
|
describe( 'InlineEditor', () => {
|
|
|
let editor, editorElement;
|
|
let editor, editorElement;
|
|
|
|
|
|
|
@@ -297,4 +300,17 @@ describe( 'InlineEditor', () => {
|
|
|
.then( newEditor => newEditor.destroy() );
|
|
.then( newEditor => newEditor.destroy() );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
+
|
|
|
|
|
+ describeMemoryUsage( () => {
|
|
|
|
|
+ testMemoryUsage(
|
|
|
|
|
+ 'should not grow on multiple create/destroy',
|
|
|
|
|
+ () => InlineEditor
|
|
|
|
|
+ .create( document.querySelector( '#mem-editor' ), {
|
|
|
|
|
+ plugins: [ ArticlePluginSet ],
|
|
|
|
|
+ toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
|
|
|
|
|
+ image: {
|
|
|
|
|
+ toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
|
|
|
|
|
+ }
|
|
|
|
|
+ } ) );
|
|
|
|
|
+ } );
|
|
|
} );
|
|
} );
|