Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/shell/renderer/test_runner/event_sender.h" | 5 #include "content/shell/renderer/test_runner/event_sender.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "content/public/common/page_zoom.h" | 10 #include "content/public/common/page_zoom.h" |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1358 0, | 1358 0, |
| 1359 &event); | 1359 &event); |
| 1360 FinishDragAndDrop(event, blink::WebDragOperationNone); | 1360 FinishDragAndDrop(event, blink::WebDragOperationNone); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 delegate_->ClearEditCommand(); | 1363 delegate_->ClearEditCommand(); |
| 1364 | 1364 |
| 1365 if (generate_char) { | 1365 if (generate_char) { |
| 1366 WebKeyboardEvent event_char = event_up; | 1366 WebKeyboardEvent event_char = event_up; |
| 1367 event_char.type = WebInputEvent::Char; | 1367 event_char.type = WebInputEvent::Char; |
| 1368 event_char.keyIdentifier[0] = '\0'; | 1368 // keyIdentifier is an empty string, unless the Enter key was pressed. |
| 1369 // This behavior is not not standard (keyIdentifier itself is not even | |
| 1370 // a standard any more), but it matches the actual behavior in Blink. | |
| 1371 if (code != UI::VKEY_RETURN) { | |
|
jochen (gone - plz use gerrit)
2014/10/17 09:13:07
nit. no { } required
| |
| 1372 event_char.keyIdentifier[0] = '\0'; | |
| 1373 } | |
| 1369 view_->handleInputEvent(event_char); | 1374 view_->handleInputEvent(event_char); |
| 1370 } | 1375 } |
| 1371 | 1376 |
| 1372 view_->handleInputEvent(event_up); | 1377 view_->handleInputEvent(event_up); |
| 1373 } | 1378 } |
| 1374 | 1379 |
| 1375 void EventSender::EnableDOMUIEventLogging() {} | 1380 void EventSender::EnableDOMUIEventLogging() {} |
| 1376 | 1381 |
| 1377 void EventSender::FireKeyboardEventsToElement() {} | 1382 void EventSender::FireKeyboardEventsToElement() {} |
| 1378 | 1383 |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2296 } | 2301 } |
| 2297 default: | 2302 default: |
| 2298 NOTREACHED(); | 2303 NOTREACHED(); |
| 2299 } | 2304 } |
| 2300 } | 2305 } |
| 2301 | 2306 |
| 2302 replaying_saved_events_ = false; | 2307 replaying_saved_events_ = false; |
| 2303 } | 2308 } |
| 2304 | 2309 |
| 2305 } // namespace content | 2310 } // namespace content |
| OLD | NEW |