| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "EventNames.h" | 10 #include "EventNames.h" |
| 11 #include "EventTarget.h" | 11 #include "EventTarget.h" |
| 12 #include "KeyboardCodes.h" | 12 #include "KeyboardCodes.h" |
| 13 #include "KeyboardEvent.h" | 13 #include "KeyboardEvent.h" |
| 14 MSVC_POP_WARNING(); | 14 MSVC_POP_WARNING(); |
| 15 | 15 |
| 16 #undef LOG |
| 17 |
| 16 #include "webkit/glue/editor_client_impl.h" | 18 #include "webkit/glue/editor_client_impl.h" |
| 17 #include "webkit/glue/event_conversion.h" | 19 #include "webkit/glue/event_conversion.h" |
| 18 #include "webkit/glue/webinputevent.h" | 20 #include "webkit/glue/webinputevent.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 22 |
| 21 using WebCore::PlatformKeyboardEvent; | 23 using WebCore::PlatformKeyboardEvent; |
| 22 using WebCore::KeyboardEvent; | 24 using WebCore::KeyboardEvent; |
| 23 | 25 |
| 24 class KeyboardTest : public testing::Test { | 26 class KeyboardTest : public testing::Test { |
| 25 public: | 27 public: |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 140 |
| 139 TEST_F(KeyboardTest, TestInsertNewline3) { | 141 TEST_F(KeyboardTest, TestInsertNewline3) { |
| 140 EXPECT_STREQ("InsertNewline", InterpretNewLine(WebInputEvent::ALT_KEY)); | 142 EXPECT_STREQ("InsertNewline", InterpretNewLine(WebInputEvent::ALT_KEY)); |
| 141 } | 143 } |
| 142 | 144 |
| 143 TEST_F(KeyboardTest, TestInsertNewline4) { | 145 TEST_F(KeyboardTest, TestInsertNewline4) { |
| 144 int modifiers = WebInputEvent::ALT_KEY | WebInputEvent::SHIFT_KEY; | 146 int modifiers = WebInputEvent::ALT_KEY | WebInputEvent::SHIFT_KEY; |
| 145 const char* result = InterpretNewLine(modifiers); | 147 const char* result = InterpretNewLine(modifiers); |
| 146 EXPECT_STREQ(result, "InsertNewline"); | 148 EXPECT_STREQ(result, "InsertNewline"); |
| 147 } | 149 } |
| OLD | NEW |