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

Side by Side Diff: chrome/test/render_view_test.h

Issue 254002: Fix cmd-up/cmd-down. (Closed)
Patch Set: Fix typo found by suzhe Created 11 years, 2 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 unified diff | Download patch
OLDNEW
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 4
5 #ifndef CHROME_TEST_RENDER_VIEW_TEST_H_ 5 #ifndef CHROME_TEST_RENDER_VIEW_TEST_H_
6 #define CHROME_TEST_RENDER_VIEW_TEST_H_ 6 #define CHROME_TEST_RENDER_VIEW_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "chrome/common/main_function_params.h" 12 #include "chrome/common/main_function_params.h"
13 #include "chrome/common/sandbox_init_wrapper.h" 13 #include "chrome/common/sandbox_init_wrapper.h"
14 #include "chrome/common/native_web_keyboard_event.h"
jeremy 2009/09/29 18:12:56 alphabetize include order.
Nico 2009/09/30 03:51:35 Done.
14 #include "chrome/renderer/mock_keyboard.h" 15 #include "chrome/renderer/mock_keyboard.h"
15 #include "chrome/renderer/mock_render_process.h" 16 #include "chrome/renderer/mock_render_process.h"
16 #include "chrome/renderer/mock_render_thread.h" 17 #include "chrome/renderer/mock_render_thread.h"
17 #include "chrome/renderer/render_view.h" 18 #include "chrome/renderer/render_view.h"
18 #include "chrome/renderer/renderer_main_platform_delegate.h" 19 #include "chrome/renderer/renderer_main_platform_delegate.h"
19 #include "chrome/renderer/renderer_webkitclient_impl.h" 20 #include "chrome/renderer/renderer_webkitclient_impl.h"
20 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
21 #include "webkit/api/public/WebFrame.h" 22 #include "webkit/api/public/WebFrame.h"
22 23
23 class RenderViewTest : public testing::Test { 24 class RenderViewTest : public testing::Test {
(...skipping 14 matching lines...) Expand all
38 39
39 // Loads the given HTML into the main frame as a data: URL. 40 // Loads the given HTML into the main frame as a data: URL.
40 void LoadHTML(const char* html); 41 void LoadHTML(const char* html);
41 42
42 // Sends IPC messages that emulates a key-press event. 43 // Sends IPC messages that emulates a key-press event.
43 int SendKeyEvent(MockKeyboard::Layout layout, 44 int SendKeyEvent(MockKeyboard::Layout layout,
44 int key_code, 45 int key_code,
45 MockKeyboard::Modifiers key_modifiers, 46 MockKeyboard::Modifiers key_modifiers,
46 std::wstring* output); 47 std::wstring* output);
47 48
49 // Sends one native key event over IPC.
50 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event);
51
48 // testing::Test 52 // testing::Test
49 virtual void SetUp(); 53 virtual void SetUp();
50 54
51 virtual void TearDown(); 55 virtual void TearDown();
52 56
53 MessageLoop msg_loop_; 57 MessageLoop msg_loop_;
54 MockRenderThread render_thread_; 58 MockRenderThread render_thread_;
55 scoped_ptr<MockProcess> mock_process_; 59 scoped_ptr<MockProcess> mock_process_;
56 scoped_refptr<RenderView> view_; 60 scoped_refptr<RenderView> view_;
57 RendererWebKitClientImpl webkitclient_; 61 RendererWebKitClientImpl webkitclient_;
58 scoped_ptr<MockKeyboard> mock_keyboard_; 62 scoped_ptr<MockKeyboard> mock_keyboard_;
59 63
60 // Used to setup the process so renderers can run. 64 // Used to setup the process so renderers can run.
61 scoped_ptr<RendererMainPlatformDelegate> platform_; 65 scoped_ptr<RendererMainPlatformDelegate> platform_;
62 scoped_ptr<MainFunctionParams> params_; 66 scoped_ptr<MainFunctionParams> params_;
63 scoped_ptr<CommandLine> command_line_; 67 scoped_ptr<CommandLine> command_line_;
64 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; 68 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_;
65 }; 69 };
66 70
67 #endif // CHROME_TEST_RENDER_VIEW_TEST_H_ 71 #endif // CHROME_TEST_RENDER_VIEW_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698