module("tinymce.plugins.Media", { setupModule: function() { QUnit.stop(); tinymce.init({ selector: "textarea", add_unload_trigger: false, skin: false, plugins: 'media', document_base_url: '/tinymce/tinymce/trunk/tests/', 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(); } }); } }); test("Object retain as is", function() { editor.setContent( '' + '' + '' + '' + '' ); equal(editor.getContent(), '

' + '' + '' + '' + '

' ); }); test("Embed retain as is", function() { editor.setContent( '' ); equal(editor.getContent(), // IE produces a different attribute order for some odd reason, I love IE tinymce.isIE ? '

' : '

' ); }); test("Video retain as is", function() { editor.setContent( '' ); equal(editor.getContent(), // IE produces a different attribute order for some odd reason, I love IE tinymce.isIE ? '

' : '

' ); }); 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}); equal(editor.getContent(), '

' + '' + '

' ); }); test("Media script elements", function() { editor.setContent( '