Bug 70880

Summary: Fix editing/selection/caret-mode-paragraph-keys-navigation.html for Mac
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cshu, eric, ojan, tkent, tonikitoo, tony, webkit.review.bot, xji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
fixes the test none

Description Ryosuke Niwa 2011-10-26 01:12:54 PDT
editing/selection/caret-mode-paragraph-keys-navigation.html assumes ctrlKey enable word-boundary movement, which isn't case on Mac. We need to use altKey on Mac instead.
Comment 1 Ryosuke Niwa 2011-10-26 01:14:57 PDT
Created attachment 112467 [details]
fixes the test
Comment 2 Eric Seidel (no email) 2011-10-26 01:25:26 PDT
Comment on attachment 112467 [details]
fixes the test

OK.  What about Apple Mac?
Comment 3 Kent Tamura 2011-10-26 01:28:51 PDT
Comment on attachment 112467 [details]
fixes the test

View in context: https://bugs.webkit.org/attachment.cgi?id=112467&action=review

> LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html:43
> +  var modifierForWordGranularity = navigator.platform == "MacIntel" ? "altKey" : "ctrlKey";

eventSender.keyDown() can have a single modifier name for such platform-dependent keys . We already have the followings:
  "addSelectionKey" (equivalent to metaKey in Mac, ctrlKey in Windows)
  "rangeSelectionKey" (equivalent to shiftKey in Mac and Windows)
(From http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree)
Comment 4 Eric Seidel (no email) 2011-10-26 01:31:44 PDT
Why is this only failing on Chromium Mac?  Is it skipped on AppleMac?
Comment 5 Ryosuke Niwa 2011-10-26 01:50:00 PDT
Comment on attachment 112467 [details]
fixes the test

View in context: https://bugs.webkit.org/attachment.cgi?id=112467&action=review

>> LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html:43
>> +  var modifierForWordGranularity = navigator.platform == "MacIntel" ? "altKey" : "ctrlKey";
> 
> eventSender.keyDown() can have a single modifier name for such platform-dependent keys . We already have the followings:
>   "addSelectionKey" (equivalent to metaKey in Mac, ctrlKey in Windows)
>   "rangeSelectionKey" (equivalent to shiftKey in Mac and Windows)
> (From http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree)

That might be a good idea.
Comment 6 Ryosuke Niwa 2011-10-26 01:50:41 PDT
(In reply to comment #4)
> Why is this only failing on Chromium Mac?  Is it skipped on AppleMac?

According to the comment in Skipped, Apple Mac doesn't support the DRT method.
Comment 7 WebKit Review Bot 2011-10-26 02:33:01 PDT
Comment on attachment 112467 [details]
fixes the test

Clearing flags on attachment: 112467

Committed r98457: <http://trac.webkit.org/changeset/98457>
Comment 8 WebKit Review Bot 2011-10-26 02:33:06 PDT
All reviewed patches have been landed.  Closing bug.