Bug 135286

Summary: highlight-insert-paragraph regression test mixing KeyEvent and KeyboardEvent
Product: WebKit Reporter: Fabien Vallée <fvallee>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Minor CC: rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Linux   

Fabien Vallée
Reported 2014-07-25 03:28:05 PDT
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); }
Attachments
Fabien Vallée
Comment 1 2014-07-25 03:52:33 PDT
please note that window.KeyEvent is not defined, so the test is never using this code... Maybe it can just be removed.
Fabien Vallée
Comment 2 2014-07-25 03:56:52 PDT
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
Note You need to log in before you can comment on or make changes to this bug.