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( | |
nyquist
2015/08/19 10:59:54
Should this be listed below the non-isolated world
| |
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 | 415 |
411 int frames_to_wait_; | 416 int frames_to_wait_; |
412 base::Closure quit_; | 417 base::Closure quit_; |
413 | 418 |
414 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); | 419 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); |
415 }; | 420 }; |
416 | 421 |
417 } // namespace content | 422 } // namespace content |
418 | 423 |
419 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 424 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |