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

Unified Diff: chrome/browser/automation/ui_controls_linux.cc

Issue 173030: Port more browser focus tests to linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: working on windows Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/ui_controls_linux.cc
===================================================================
--- chrome/browser/automation/ui_controls_linux.cc (revision 23643)
+++ chrome/browser/automation/ui_controls_linux.cc (working copy)
@@ -53,8 +53,11 @@
event->key.window = GTK_WIDGET(window)->window;
g_object_ref(event->key.window);
event->key.send_event = false;
- // TODO(estade): Put the real time?
- event->key.time = GDK_CURRENT_TIME;
+
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ event->key.time = ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
+
// TODO(estade): handle other state flags besides control, shift, alt?
// For example caps lock.
event->key.state = (control ? GDK_CONTROL_MASK : 0) |

Powered by Google App Engine
This is Rietveld 408576698