| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_TEST_RENDER_VIEW_TEST_H_ | 5 #ifndef CONTENT_TEST_RENDER_VIEW_TEST_H_ |
| 6 #define CONTENT_TEST_RENDER_VIEW_TEST_H_ | 6 #define CONTENT_TEST_RENDER_VIEW_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 int key_code, | 78 int key_code, |
| 79 MockKeyboard::Modifiers key_modifiers, | 79 MockKeyboard::Modifiers key_modifiers, |
| 80 string16* output); | 80 string16* output); |
| 81 | 81 |
| 82 // Sends one native key event over IPC. | 82 // Sends one native key event over IPC. |
| 83 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); | 83 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); |
| 84 | 84 |
| 85 // Send a raw keyboard event to the renderer. | 85 // Send a raw keyboard event to the renderer. |
| 86 void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); | 86 void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); |
| 87 | 87 |
| 88 // Send a raw mouse event to the renderer. |
| 89 void SendWebMouseEvent(const WebKit::WebMouseEvent& key_event); |
| 90 |
| 88 // Returns the bounds (coordinates and size) of the element with id | 91 // Returns the bounds (coordinates and size) of the element with id |
| 89 // |element_id|. Returns an empty rect if such an element was not found. | 92 // |element_id|. Returns an empty rect if such an element was not found. |
| 90 gfx::Rect GetElementBounds(const std::string& element_id); | 93 gfx::Rect GetElementBounds(const std::string& element_id); |
| 91 | 94 |
| 92 // Sends a left mouse click in the middle of the element with id |element_id|. | 95 // Sends a left mouse click in the middle of the element with id |element_id|. |
| 93 // Returns true if the event was sent, false otherwise (typically because | 96 // Returns true if the event was sent, false otherwise (typically because |
| 94 // the element was not found). | 97 // the element was not found). |
| 95 bool SimulateElementClick(const std::string& element_id); | 98 bool SimulateElementClick(const std::string& element_id); |
| 96 | 99 |
| 97 // Clears anything associated with the browsing history. | 100 // Clears anything associated with the browsing history. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 126 | 129 |
| 127 // Used to setup the process so renderers can run. | 130 // Used to setup the process so renderers can run. |
| 128 scoped_ptr<RendererMainPlatformDelegate> platform_; | 131 scoped_ptr<RendererMainPlatformDelegate> platform_; |
| 129 scoped_ptr<content::MainFunctionParams> params_; | 132 scoped_ptr<content::MainFunctionParams> params_; |
| 130 scoped_ptr<CommandLine> command_line_; | 133 scoped_ptr<CommandLine> command_line_; |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace content | 136 } // namespace content |
| 134 | 137 |
| 135 #endif // CONTENT_TEST_RENDER_VIEW_TEST_H_ | 138 #endif // CONTENT_TEST_RENDER_VIEW_TEST_H_ |
| OLD | NEW |