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 CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
6 #define CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 6 #define CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Returns the bounds (coordinates and size) of the element with id | 78 // Returns the bounds (coordinates and size) of the element with id |
79 // |element_id|. Returns an empty rect if such an element was not found. | 79 // |element_id|. Returns an empty rect if such an element was not found. |
80 gfx::Rect GetElementBounds(const std::string& element_id); | 80 gfx::Rect GetElementBounds(const std::string& element_id); |
81 | 81 |
82 // Sends a left mouse click in the middle of the element with id |element_id|. | 82 // Sends a left mouse click in the middle of the element with id |element_id|. |
83 // Returns true if the event was sent, false otherwise (typically because | 83 // Returns true if the event was sent, false otherwise (typically because |
84 // the element was not found). | 84 // the element was not found). |
85 bool SimulateElementClick(const std::string& element_id); | 85 bool SimulateElementClick(const std::string& element_id); |
86 | 86 |
| 87 // Clears anything associated with the browsing history. |
| 88 void ClearHistory(); |
| 89 |
87 // testing::Test | 90 // testing::Test |
88 virtual void SetUp(); | 91 virtual void SetUp(); |
89 | 92 |
90 virtual void TearDown(); | 93 virtual void TearDown(); |
91 | 94 |
92 MessageLoop msg_loop_; | 95 MessageLoop msg_loop_; |
93 chrome::ChromeContentRendererClient chrome_content_renderer_client_; | 96 chrome::ChromeContentRendererClient chrome_content_renderer_client_; |
94 ExtensionDispatcher* extension_dispatcher_; | 97 ExtensionDispatcher* extension_dispatcher_; |
95 MockRenderThread render_thread_; | 98 MockRenderThread render_thread_; |
96 scoped_ptr<MockRenderProcess> mock_process_; | 99 scoped_ptr<MockRenderProcess> mock_process_; |
97 scoped_refptr<RenderView> view_; | 100 scoped_refptr<RenderView> view_; |
98 RendererWebKitClientImplNoSandbox webkitclient_; | 101 RendererWebKitClientImplNoSandbox webkitclient_; |
99 scoped_ptr<MockKeyboard> mock_keyboard_; | 102 scoped_ptr<MockKeyboard> mock_keyboard_; |
100 | 103 |
101 // Used to setup the process so renderers can run. | 104 // Used to setup the process so renderers can run. |
102 scoped_ptr<RendererMainPlatformDelegate> platform_; | 105 scoped_ptr<RendererMainPlatformDelegate> platform_; |
103 scoped_ptr<MainFunctionParams> params_; | 106 scoped_ptr<MainFunctionParams> params_; |
104 scoped_ptr<CommandLine> command_line_; | 107 scoped_ptr<CommandLine> command_line_; |
105 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; | 108 scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; |
106 | 109 |
107 autofill::PasswordAutofillManager* password_autofill_; | 110 autofill::PasswordAutofillManager* password_autofill_; |
108 autofill::AutofillAgent* autofill_agent_; | 111 autofill::AutofillAgent* autofill_agent_; |
109 }; | 112 }; |
110 | 113 |
111 #endif // CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ | 114 #endif // CHROME_TEST_BASE_RENDER_VIEW_TEST_H_ |
OLD | NEW |