|
@@ -18,6 +18,8 @@ import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin
|
|
|
import RootElement from '@ckeditor/ckeditor5-engine/src/model/rootelement';
|
|
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 { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
|
|
|
|
|
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
|
|
|
|
|
|
|
|
const editorData = '<p><strong>foo</strong> bar</p>';
|
|
const editorData = '<p><strong>foo</strong> bar</p>';
|
|
|
|
|
|
|
@@ -303,4 +305,17 @@ describe( 'DecoupledEditor', () => {
|
|
|
} );
|
|
} );
|
|
|
}
|
|
}
|
|
|
} );
|
|
} );
|
|
|
|
|
+
|
|
|
|
|
+ describeMemoryUsage( () => {
|
|
|
|
|
+ testMemoryUsage(
|
|
|
|
|
+ 'should not grow on multiple create/destroy',
|
|
|
|
|
+ () => DecoupledEditor
|
|
|
|
|
+ .create( document.querySelector( '#mem-editor' ), {
|
|
|
|
|
+ plugins: [ ArticlePluginSet ],
|
|
|
|
|
+ toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
|
|
|
|
|
+ image: {
|
|
|
|
|
+ toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
|
|
|
|
|
+ }
|
|
|
|
|
+ } ) );
|
|
|
|
|
+ } );
|
|
|
} );
|
|
} );
|