[Webkit-unassigned] [Bug 34178] Add KeyboardTest to WebKit API tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 26 12:43:43 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34178


Darin Fisher (:fishd, Google) <fishd at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #47433|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #4 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-01-26 12:43:42 PST ---
(From update of attachment 47433)
> +++ b/WebKit/chromium/tests/KeyboardTest.cpp

> +#include "../src/EditorClientImpl.h"
> +#include "../src/WebInputEventConversion.h"

how about just adding src to include_dirs in WebKit.gyp?


> +using WebCore::PlatformKeyboardEvent;
> +using WebCore::KeyboardEvent;
> +
> +using WebKit::EditorClientImpl;
> +using WebKit::PlatformKeyboardEventBuilder;
> +using WebKit::WebInputEvent;
> +using WebKit::WebKeyboardEvent;

let's just do 'using namespace Webcore' and 'using namespace WebKit'


> +class KeyboardTest : public testing::Test {
> +public:
> +    void SetUp()
> +    {
> +        WTF::initializeThreading();

^^^ you should be able to delete this function.  RunAllTests.cpp takes care of
it.


> +    const char* InterpretKeyEvent(
> +    void SetupKeyDownEvent(WebKeyboardEvent* keyboardEvent,
> +    const char* InterpretOSModifierKeyPress(char keyCode)
> +    const char* InterpretCtrlKeyPress(char keyCode)
> +    const char* InterpretTab(int modifiers)
> +    const char* InterpretNewLine(int modifiers)

nit: change these to camelCase style


> +#if !defined(OS_MACOSX)

the OS_MACOSX macro is a chromium define.  i don't think we have access
to it here.  this should be changed to OS(DARWIN).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list