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