Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: third_party/WebKit/Source/web/tests/KeyboardTest.cpp

Issue 1942683004: Ctrl/Alt+Enter shouldn't insert newline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yosin's review Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingBehavior.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TEST_F(KeyboardTest, TestInsertBackTab) 178 TEST_F(KeyboardTest, TestInsertBackTab)
179 { 179 {
180 EXPECT_STREQ("InsertBacktab", interpretTab(WebInputEvent::ShiftKey)); 180 EXPECT_STREQ("InsertBacktab", interpretTab(WebInputEvent::ShiftKey));
181 } 181 }
182 182
183 TEST_F(KeyboardTest, TestInsertNewline) 183 TEST_F(KeyboardTest, TestInsertNewline)
184 { 184 {
185 EXPECT_STREQ("InsertNewline", interpretNewLine(noModifiers)); 185 EXPECT_STREQ("InsertNewline", interpretNewLine(noModifiers));
186 } 186 }
187 187
188 TEST_F(KeyboardTest, TestInsertNewline2)
189 {
190 EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::ControlKey));
191 }
192
193 TEST_F(KeyboardTest, TestInsertLineBreak) 188 TEST_F(KeyboardTest, TestInsertLineBreak)
194 { 189 {
195 EXPECT_STREQ("InsertLineBreak", interpretNewLine(WebInputEvent::ShiftKey)); 190 EXPECT_STREQ("InsertLineBreak", interpretNewLine(WebInputEvent::ShiftKey));
196 } 191 }
197 192
198 TEST_F(KeyboardTest, TestInsertNewline3)
199 {
200 EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::AltKey));
201 }
202
203 TEST_F(KeyboardTest, TestInsertNewline4)
204 {
205 int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey;
206 const char* result = interpretNewLine(modifiers);
207 EXPECT_STREQ("InsertNewline", result);
208 }
209
210 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingBehavior.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698