module("tinymce.utils.Quirks_WebKit", { setupModule: function() { QUnit.stop(); tinymce.init({ selector: "textarea", elements: "elm1", add_unload_trigger: false, skin: false, indent: false, disable_nodechange: true, init_instance_callback : function(ed) { window.editor = ed; QUnit.start(); } }); } }); if (tinymce.isWebKit) { test('Delete from beginning of P into H1', function() { editor.getBody().innerHTML ='
b
'; Utils.setSelection('p', 0); editor.execCommand('Delete'); equal(Utils.cleanHtml(editor.getBody().innerHTML), 'b
'; var rng = editor.selection.getRng(); rng.setStartBefore(editor.getBody().firstChild); rng.setEndAfter(editor.getBody().firstChild); editor.selection.setRng(rng); editor.execCommand('Delete'); equal(Utils.cleanHtml(editor.getBody().innerHTML), 'bc
'; Utils.setSelection('p', 0); editor.execCommand('Delete'); equal(Utils.normalizeHtml(Utils.cleanHtml(editor.getBody().innerHTML)), 'b
'; Utils.setSelection('h1', 1); editor.execCommand('ForwardDelete'); equal(Utils.cleanHtml(editor.getBody().innerHTML), 'b
'; var rng = editor.selection.getRng(); rng.setStartBefore(editor.getBody().firstChild); rng.setEndAfter(editor.getBody().firstChild); editor.selection.setRng(rng); editor.execCommand('ForwardDelete'); equal(Utils.cleanHtml(editor.getBody().innerHTML), 'bc
'; Utils.setSelection('h1', 1); editor.execCommand('ForwardDelete'); equal(editor.getContent(), 'b
'; Utils.setSelection('p', 0); editor.fire("keydown", {keyCode: 8}); equal(Utils.cleanHtml(editor.getBody().innerHTML), 'b
'; Utils.setSelection('h1', 1); editor.fire("keydown", {keyCode: 46}); equal(Utils.cleanHtml(editor.getBody().innerHTML), '