| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/renderer_host/gtk_key_bindings_handler.h" | 4 #include "chrome/browser/renderer_host/gtk_key_bindings_handler.h" |
| 5 | 5 |
| 6 #include <gdk/gdkkeysyms.h> | 6 #include <gdk/gdkkeysyms.h> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
| 17 #include "chrome/common/edit_command.h" | 17 #include "chrome/common/edit_command.h" |
| 18 #include "chrome/common/native_web_keyboard_event.h" | 18 #include "content/common/native_web_keyboard_event.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 class GtkKeyBindingsHandlerTest : public testing::Test { | 21 class GtkKeyBindingsHandlerTest : public testing::Test { |
| 22 protected: | 22 protected: |
| 23 struct EditCommand { | 23 struct EditCommand { |
| 24 const char* name; | 24 const char* name; |
| 25 const char* value; | 25 const char* value; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 GtkKeyBindingsHandlerTest() | 28 GtkKeyBindingsHandlerTest() |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 }; | 211 }; |
| 212 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_8, GDK_CONTROL_MASK), | 212 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_8, GDK_CONTROL_MASK), |
| 213 kSelectAll, arraysize(kSelectAll)); | 213 kSelectAll, arraysize(kSelectAll)); |
| 214 | 214 |
| 215 static const EditCommand kSetAnchor[] = { | 215 static const EditCommand kSetAnchor[] = { |
| 216 { "SetMark", "" } | 216 { "SetMark", "" } |
| 217 }; | 217 }; |
| 218 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_9, GDK_CONTROL_MASK), | 218 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_9, GDK_CONTROL_MASK), |
| 219 kSetAnchor, arraysize(kSetAnchor)); | 219 kSetAnchor, arraysize(kSetAnchor)); |
| 220 } | 220 } |
| OLD | NEW |