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 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 6 #define CONTENT_PUBLIC_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" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 // Returns the bounds (coordinates and size) of the element with id | 101 // Returns the bounds (coordinates and size) of the element with id |
102 // |element_id|. Returns an empty rect if such an element was not found. | 102 // |element_id|. Returns an empty rect if such an element was not found. |
103 gfx::Rect GetElementBounds(const std::string& element_id); | 103 gfx::Rect GetElementBounds(const std::string& element_id); |
104 | 104 |
105 // Sends a left mouse click in the middle of the element with id |element_id|. | 105 // Sends a left mouse click in the middle of the element with id |element_id|. |
106 // Returns true if the event was sent, false otherwise (typically because | 106 // Returns true if the event was sent, false otherwise (typically because |
107 // the element was not found). | 107 // the element was not found). |
108 bool SimulateElementClick(const std::string& element_id); | 108 bool SimulateElementClick(const std::string& element_id); |
109 | 109 |
| 110 // Simulates receiving a message about completion of animations caused by a |
| 111 // focus change. The message could originate from the browser, renderer, or |
| 112 // compositor. |
| 113 void SimulateFocusChangeCompleteMessageReceived(); |
| 114 |
110 // Simulates |node| being focused. | 115 // Simulates |node| being focused. |
111 void SetFocused(const blink::WebNode& node); | 116 void SetFocused(const blink::WebNode& node); |
112 | 117 |
113 // Simulates a navigation with a type of reload to the given url. | 118 // Simulates a navigation with a type of reload to the given url. |
114 void Reload(const GURL& url); | 119 void Reload(const GURL& url); |
115 | 120 |
116 // Returns the IPC message ID of the navigation message. | 121 // Returns the IPC message ID of the navigation message. |
117 uint32 GetNavigationIPCType(); | 122 uint32 GetNavigationIPCType(); |
118 | 123 |
119 // Resize the view. | 124 // Resize the view. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 167 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
163 #endif | 168 #endif |
164 | 169 |
165 private: | 170 private: |
166 void GoToOffset(int offset, const PageState& state); | 171 void GoToOffset(int offset, const PageState& state); |
167 }; | 172 }; |
168 | 173 |
169 } // namespace content | 174 } // namespace content |
170 | 175 |
171 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 176 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
OLD | NEW |