OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 TEST_F(KeyboardTest, TestOSModifierV) | 161 TEST_F(KeyboardTest, TestOSModifierV) |
162 { | 162 { |
163 #if !OS(MACOSX) | 163 #if !OS(MACOSX) |
164 EXPECT_STREQ("Paste", interpretOSModifierKeyPress('V')); | 164 EXPECT_STREQ("Paste", interpretOSModifierKeyPress('V')); |
165 #endif | 165 #endif |
166 } | 166 } |
167 | 167 |
168 TEST_F(KeyboardTest, TestEscape) | 168 TEST_F(KeyboardTest, TestEscape) |
169 { | 169 { |
170 WebKeyboardEvent keyboardEvent; | 170 WebKeyboardEvent keyboardEvent; |
171 setupKeyDownEvent(&keyboardEvent, blink::VKEY_ESCAPE, noModifiers); | 171 setupKeyDownEvent(&keyboardEvent, VKEY_ESCAPE, noModifiers); |
172 | 172 |
173 const char* result = interpretKeyEvent(keyboardEvent, | 173 const char* result = interpretKeyEvent(keyboardEvent, |
174 PlatformEvent::RawKeyDown); | 174 PlatformEvent::RawKeyDown); |
175 EXPECT_STREQ("Cancel", result); | 175 EXPECT_STREQ("Cancel", result); |
176 } | 176 } |
177 | 177 |
178 TEST_F(KeyboardTest, TestInsertTab) | 178 TEST_F(KeyboardTest, TestInsertTab) |
179 { | 179 { |
180 EXPECT_STREQ("InsertTab", interpretTab(noModifiers)); | 180 EXPECT_STREQ("InsertTab", interpretTab(noModifiers)); |
181 } | 181 } |
(...skipping 24 matching lines...) Expand all Loading... |
206 } | 206 } |
207 | 207 |
208 TEST_F(KeyboardTest, TestInsertNewline4) | 208 TEST_F(KeyboardTest, TestInsertNewline4) |
209 { | 209 { |
210 int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey; | 210 int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey; |
211 const char* result = interpretNewLine(modifiers); | 211 const char* result = interpretNewLine(modifiers); |
212 EXPECT_STREQ("InsertNewline", result); | 212 EXPECT_STREQ("InsertNewline", result); |
213 } | 213 } |
214 | 214 |
215 } // empty namespace | 215 } // empty namespace |
OLD | NEW |