Bug 34178 - Add KeyboardTest to WebKit API tests
Summary: Add KeyboardTest to WebKit API tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-26 12:22 PST by Yaar Schnitman
Modified: 2010-01-26 21:54 PST (History)
3 users (show)

See Also:


Attachments
Patch (8.20 KB, patch)
2010-01-26 12:34 PST, Yaar Schnitman
no flags Details | Formatted Diff | Diff
Patch (7.98 KB, patch)
2010-01-26 12:54 PST, Yaar Schnitman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yaar Schnitman 2010-01-26 12:22:20 PST
Add KeyboardTest to WebKit API tests
Comment 1 Yaar Schnitman 2010-01-26 12:34:57 PST
Created attachment 47433 [details]
Patch
Comment 2 WebKit Review Bot 2010-01-26 12:36:33 PST
Attachment 47433 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/chromium/tests/KeyboardTest.cpp:33:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/chromium/tests/KeyboardTest.cpp:35:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Yaar Schnitman 2010-01-26 12:38:12 PST
Comment on attachment 47433 [details]
Patch

Style checker can't chew on the special headers structure of this gtest.
Comment 4 Darin Fisher (:fishd, Google) 2010-01-26 12:43:42 PST
Comment on attachment 47433 [details]
Patch

> +++ 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).
Comment 5 Yaar Schnitman 2010-01-26 12:54:16 PST
Created attachment 47435 [details]
Patch
Comment 6 WebKit Review Bot 2010-01-26 13:00:22 PST
Attachment 47435 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/chromium/tests/KeyboardTest.cpp:33:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/chromium/tests/KeyboardTest.cpp:35:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2010-01-26 21:54:22 PST
Comment on attachment 47435 [details]
Patch

Clearing flags on attachment: 47435

Committed r53898: <http://trac.webkit.org/changeset/53898>
Comment 8 WebKit Commit Bot 2010-01-26 21:54:29 PST
All reviewed patches have been landed.  Closing bug.