OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/renderer_host/gtk_key_bindings_handler.h" | 5 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 16 matching lines...) Expand all Loading... |
27 const char* name; | 27 const char* name; |
28 const char* value; | 28 const char* value; |
29 }; | 29 }; |
30 | 30 |
31 GtkKeyBindingsHandlerTest() | 31 GtkKeyBindingsHandlerTest() |
32 : window_(gtk_window_new(GTK_WINDOW_TOPLEVEL)), | 32 : window_(gtk_window_new(GTK_WINDOW_TOPLEVEL)), |
33 handler_(NULL) { | 33 handler_(NULL) { |
34 base::FilePath gtkrc; | 34 base::FilePath gtkrc; |
35 PathService::Get(DIR_TEST_DATA, >krc); | 35 PathService::Get(DIR_TEST_DATA, >krc); |
36 gtkrc = gtkrc.AppendASCII("gtk_key_bindings_test_gtkrc"); | 36 gtkrc = gtkrc.AppendASCII("gtk_key_bindings_test_gtkrc"); |
37 EXPECT_TRUE(file_util::PathExists(gtkrc)); | 37 EXPECT_TRUE(base::PathExists(gtkrc)); |
38 | 38 |
39 gtk_rc_parse(gtkrc.value().c_str()); | 39 gtk_rc_parse(gtkrc.value().c_str()); |
40 | 40 |
41 GtkWidget* fixed = gtk_fixed_new(); | 41 GtkWidget* fixed = gtk_fixed_new(); |
42 handler_ = new GtkKeyBindingsHandler(fixed); | 42 handler_ = new GtkKeyBindingsHandler(fixed); |
43 gtk_container_add(GTK_CONTAINER(window_), fixed); | 43 gtk_container_add(GTK_CONTAINER(window_), fixed); |
44 gtk_widget_show(fixed); | 44 gtk_widget_show(fixed); |
45 gtk_widget_show(window_); | 45 gtk_widget_show(window_); |
46 } | 46 } |
47 virtual ~GtkKeyBindingsHandlerTest() { | 47 virtual ~GtkKeyBindingsHandlerTest() { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 kSelectAll, arraysize(kSelectAll)); | 217 kSelectAll, arraysize(kSelectAll)); |
218 | 218 |
219 static const EditCommand kSetAnchor[] = { | 219 static const EditCommand kSetAnchor[] = { |
220 { "SetMark", "" } | 220 { "SetMark", "" } |
221 }; | 221 }; |
222 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_9, GDK_CONTROL_MASK), | 222 TestKeyBinding(NewNativeWebKeyboardEvent(GDK_9, GDK_CONTROL_MASK), |
223 kSetAnchor, arraysize(kSetAnchor)); | 223 kSetAnchor, arraysize(kSetAnchor)); |
224 } | 224 } |
225 | 225 |
226 } // namespace content | 226 } // namespace content |
OLD | NEW |