| 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_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The following methods executes the passed |script| in the specified frame and | 183 // The following methods executes the passed |script| in the specified frame and |
| 184 // sets |result| to the value passed to "window.domAutomationController.send" by | 184 // sets |result| to the value passed to "window.domAutomationController.send" by |
| 185 // the executed script. They return true on success, false if the script | 185 // the executed script. They return true on success, false if the script |
| 186 // execution failed or did not evaluate to the expected type. | 186 // execution failed or did not evaluate to the expected type. |
| 187 bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter, | 187 bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter, |
| 188 const std::string& script, | 188 const std::string& script, |
| 189 int* result) WARN_UNUSED_RESULT; | 189 int* result) WARN_UNUSED_RESULT; |
| 190 bool ExecuteScriptAndExtractBool(const ToRenderFrameHost& adapter, | 190 bool ExecuteScriptAndExtractBool(const ToRenderFrameHost& adapter, |
| 191 const std::string& script, | 191 const std::string& script, |
| 192 bool* result) WARN_UNUSED_RESULT; | 192 bool* result) WARN_UNUSED_RESULT; |
| 193 bool ExecuteScriptInIsolatedWorldAndExtractBool( |
| 194 const ToRenderFrameHost& adapter, |
| 195 const int world_id, |
| 196 const std::string& script, |
| 197 bool* result) WARN_UNUSED_RESULT; |
| 193 bool ExecuteScriptAndExtractString(const ToRenderFrameHost& adapter, | 198 bool ExecuteScriptAndExtractString(const ToRenderFrameHost& adapter, |
| 194 const std::string& script, | 199 const std::string& script, |
| 195 std::string* result) WARN_UNUSED_RESULT; | 200 std::string* result) WARN_UNUSED_RESULT; |
| 196 | 201 |
| 197 // Walks the frame tree of the specified WebContents and returns the sole frame | 202 // Walks the frame tree of the specified WebContents and returns the sole frame |
| 198 // that matches the specified predicate function. This function will DCHECK if | 203 // that matches the specified predicate function. This function will DCHECK if |
| 199 // no frames match the specified predicate, or if more than one frame matches. | 204 // no frames match the specified predicate, or if more than one frame matches. |
| 200 RenderFrameHost* FrameMatchingPredicate( | 205 RenderFrameHost* FrameMatchingPredicate( |
| 201 WebContents* web_contents, | 206 WebContents* web_contents, |
| 202 const base::Callback<bool(RenderFrameHost*)>& predicate); | 207 const base::Callback<bool(RenderFrameHost*)>& predicate); |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 int routing_id_; | 455 int routing_id_; |
| 451 bool deleted_; | 456 bool deleted_; |
| 452 scoped_ptr<base::RunLoop> runner_; | 457 scoped_ptr<base::RunLoop> runner_; |
| 453 | 458 |
| 454 DISALLOW_COPY_AND_ASSIGN(RenderFrameDeletedObserver); | 459 DISALLOW_COPY_AND_ASSIGN(RenderFrameDeletedObserver); |
| 455 }; | 460 }; |
| 456 | 461 |
| 457 } // namespace content | 462 } // namespace content |
| 458 | 463 |
| 459 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 464 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |