module("tinymce.plugins.Media", { setupModule: function() { QUnit.stop(); tinymce.init({ selector: "textarea", add_unload_trigger: false, skin: false, plugins: wpPlugins, document_base_url: '/tinymce/tinymce/trunk/tests/', extended_valid_elements: 'script[src|type]', media_scripts: [ {filter: 'http://media1.tinymce.com'}, {filter: 'http://media2.tinymce.com', width: 100, height: 200} ], init_instance_callback: function(ed) { window.editor = ed; QUnit.start(); } }); }, teardown: function() { delete editor.settings.media_filter_html; } }); test("Object retain as is", function() { editor.setContent( '' ); equal(editor.getContent(), '
' ); }); test("Embed retain as is", function() { editor.setContent( '' ); equal( editor.getContent(), 'textlink
' ); }); test("Video retain as is", function() { editor.setContent( '' ); equal( editor.getContent(), '' ); }); test("Iframe retain as is", function() { editor.setContent( '' ); equal(editor.getContent(), '' ); }); test("Audio retain as is", function() { editor.setContent( '' ); equal(editor.getContent(), '' + '' + '
' ); }); test("Resize complex object", function() { editor.setContent( '' ); var placeholderElm = editor.getBody().firstChild.firstChild; placeholderElm.width = 100; placeholderElm.height = 200; editor.fire('objectResized', {target: placeholderElm, width: placeholderElm.width, height: placeholderElm.height}); editor.settings.media_filter_html = false; equal(editor.getContent(), '' + '' + '
' ); }); test("Media script elements", function() { editor.setContent( '