<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>135286</bug_id>
          
          <creation_ts>2014-07-25 03:28:05 -0700</creation_ts>
          <short_desc>highlight-insert-paragraph regression test mixing KeyEvent and KeyboardEvent</short_desc>
          <delta_ts>2014-07-29 00:36:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fabien Vallée">fvallee</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1024807</commentid>
    <comment_count>0</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-07-25 03:28:05 -0700</bug_when>
    <thetext>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(&quot;KeyboardEvent&quot;);
    ev.initKeyEvent(&quot;keypress&quot;, 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(&quot;KeyboardEvent&quot;);
-        ev.initKeyEvent(&quot;keypress&quot;, true, true, window,  0,0,0,0, 0, key.charCodeAt(0));
+        ev.initKeyboardEvent(&quot;keypress&quot;, true, true, window,  0,0,0,0, 0, key.charCodeAt(0));
         document.body.dispatchEvent(ev);
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024808</commentid>
    <comment_count>1</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-07-25 03:52:33 -0700</bug_when>
    <thetext>please note that window.KeyEvent is not defined, so the test is never using this code... Maybe it can just be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024809</commentid>
    <comment_count>2</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-07-25 03:56:52 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>