LayoutTests/editing/style/highlight-insert-paragraph.html is mixing - KeyEvent (e.g. defined in CEHTML, but seems firefox is using it too) and - KeyboardEvent ( http://www.w3.org/TR/DOM-Level-3-Events/#widl-KeyboardEvent-shiftKey ) in pressKey function if (window.KeyEvent) { var ev = document.createEvent("KeyboardEvent"); ev.initKeyEvent("keypress", true, true, window, 0,0,0,0, 0, key.charCodeAt(0)); document.body.dispatchEvent(ev); } I assume the test mean to use Keyboard event, so the code should be something like : function pressKey( key ) { - if (window.KeyEvent) { + if (window.KeyboardEvent) { var ev = document.createEvent("KeyboardEvent"); - ev.initKeyEvent("keypress", true, true, window, 0,0,0,0, 0, key.charCodeAt(0)); + ev.initKeyboardEvent("keypress", true, true, window, 0,0,0,0, 0, key.charCodeAt(0)); document.body.dispatchEvent(ev); }
please note that window.KeyEvent is not defined, so the test is never using this code... Maybe it can just be removed.
Same issue can also be found in : LayoutTests/editing/inserting/insert-paragraph-separator-in-blockquote.html LayoutTests/editing/inserting/typing-space-to-trigger-smart-link.html LayoutTests/editing/execCommand/script-tests/break-out-of-empty-list-item.js