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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Returns true if the JavaScript was evaluated correctly to an int value, | 81 // Returns true if the JavaScript was evaluated correctly to an int value, |
82 // false otherwise. | 82 // false otherwise. |
83 bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, | 83 bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, |
84 int* result); | 84 int* result); |
85 | 85 |
86 // Loads the given HTML into the main frame as a data: URL and blocks until | 86 // Loads the given HTML into the main frame as a data: URL and blocks until |
87 // the navigation is committed. | 87 // the navigation is committed. |
88 void LoadHTML(const char* html); | 88 void LoadHTML(const char* html); |
89 | 89 |
90 // Returns the current PageState. | 90 // Returns the current PageState. |
| 91 // In OOPIF enabled modes, this returns a PageState object for the main frame. |
91 PageState GetCurrentPageState(); | 92 PageState GetCurrentPageState(); |
92 | 93 |
93 // Navigates the main frame back or forward in session history and commits. | 94 // Navigates the main frame back or forward in session history and commits. |
94 // The caller must capture a PageState for the target page. | 95 // The caller must capture a PageState for the target page. |
95 void GoBack(const PageState& state); | 96 void GoBack(const PageState& state); |
96 void GoForward(const PageState& state); | 97 void GoForward(const PageState& state); |
97 | 98 |
98 // Sends one native key event over IPC. | 99 // Sends one native key event over IPC. |
99 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); | 100 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); |
100 | 101 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 198 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
198 #endif | 199 #endif |
199 | 200 |
200 private: | 201 private: |
201 void GoToOffset(int offset, const PageState& state); | 202 void GoToOffset(int offset, const PageState& state); |
202 }; | 203 }; |
203 | 204 |
204 } // namespace content | 205 } // namespace content |
205 | 206 |
206 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 207 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
OLD | NEW |