Summary: | Add KeyboardTest to WebKit API tests | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yaar Schnitman <yaar> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, fishd, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Yaar Schnitman
2010-01-26 12:22:20 PST
Created attachment 47433 [details]
Patch
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 on attachment 47433 [details]
Patch
Style checker can't chew on the special headers structure of this gtest.
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). Created attachment 47435 [details]
Patch
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 on attachment 47435 [details] Patch Clearing flags on attachment: 47435 Committed r53898: <http://trac.webkit.org/changeset/53898> All reviewed patches have been landed. Closing bug. |