Index: chrome/browser/chromeos/login/screen_locker_tester.cc |
diff --git a/chrome/browser/chromeos/login/screen_locker_tester.cc b/chrome/browser/chromeos/login/screen_locker_tester.cc |
index 776aa6ab02c96164df56f7ce87d28457ccbdf04c..ea19127fdf92566e1d46fcc5050d709f9c78cf13 100644 |
--- a/chrome/browser/chromeos/login/screen_locker_tester.cc |
+++ b/chrome/browser/chromeos/login/screen_locker_tester.cc |
@@ -7,6 +7,7 @@ |
#include <gdk/gdkkeysyms.h> |
#include "app/l10n_util.h" |
+#include "base/scoped_ptr.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/chromeos/login/mock_authenticator.h" |
#include "chrome/browser/chromeos/login/screen_locker.h" |
@@ -37,10 +38,13 @@ void ScreenLockerTester::EnterPassword(const char* password) { |
DCHECK(ScreenLocker::screen_locker_); |
views::Textfield* pass = GetPasswordField(); |
pass->SetText(ASCIIToUTF16(password)); |
- GdkEventKey eventKey; |
- eventKey.keyval = GDK_Return; |
- views::Textfield::Keystroke ret(&eventKey); |
+ GdkEvent* event = gdk_event_new(GDK_KEY_PRESS); |
+ |
+ event->key.keyval = GDK_Return; |
+ views::Textfield::Keystroke ret(&event->key); |
ScreenLocker::screen_locker_->screen_lock_view_->HandleKeystroke(pass, ret); |
+ |
+ gdk_event_free(event); |
} |
views::Textfield* ScreenLockerTester::GetPasswordField() { |