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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 protected: | 67 protected: |
68 // Spins the message loop to process all messages that are currently pending. | 68 // Spins the message loop to process all messages that are currently pending. |
69 void ProcessPendingMessages(); | 69 void ProcessPendingMessages(); |
70 | 70 |
71 // Returns a pointer to the main frame. | 71 // Returns a pointer to the main frame. |
72 blink::WebLocalFrame* GetMainFrame(); | 72 blink::WebLocalFrame* GetMainFrame(); |
73 | 73 |
74 // Executes the given JavaScript in the context of the main frame. The input | 74 // Executes the given JavaScript in the context of the main frame. The input |
75 // is a NULL-terminated UTF-8 string. | 75 // is a NULL-terminated UTF-8 string. |
76 void ExecuteJavaScriptForTests(const char* js); | 76 void ExecuteJavaScript(const char* js); |
77 | 77 |
78 // Executes the given JavaScript and sets the int value it evaluates to in | 78 // Executes the given JavaScript and sets the int value it evaluates to in |
79 // |result|. | 79 // |result|. |
80 // Returns true if the JavaScript was evaluated correctly to an int value, | 80 // Returns true if the JavaScript was evaluated correctly to an int value, |
81 // false otherwise. | 81 // false otherwise. |
82 bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, | 82 bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, |
83 int* result); | 83 int* result); |
84 | 84 |
85 // Loads the given HTML into the main frame as a data: URL and blocks until | 85 // Loads the given HTML into the main frame as a data: URL and blocks until |
86 // the navigation is committed. | 86 // the navigation is committed. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 193 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
194 #endif | 194 #endif |
195 | 195 |
196 private: | 196 private: |
197 void GoToOffset(int offset, const PageState& state); | 197 void GoToOffset(int offset, const PageState& state); |
198 }; | 198 }; |
199 | 199 |
200 } // namespace content | 200 } // namespace content |
201 | 201 |
202 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 202 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
OLD | NEW |