Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 1231083007: Expose distiller functions to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-content
Patch Set: Clean up Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // The following methods executes the passed |script| in the specified frame and 184 // The following methods executes the passed |script| in the specified frame and
185 // sets |result| to the value passed to "window.domAutomationController.send" by 185 // sets |result| to the value passed to "window.domAutomationController.send" by
186 // the executed script. They return true on success, false if the script 186 // the executed script. They return true on success, false if the script
187 // execution failed or did not evaluate to the expected type. 187 // execution failed or did not evaluate to the expected type.
188 bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter, 188 bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter,
189 const std::string& script, 189 const std::string& script,
190 int* result) WARN_UNUSED_RESULT; 190 int* result) WARN_UNUSED_RESULT;
191 bool ExecuteScriptAndExtractBool(const ToRenderFrameHost& adapter, 191 bool ExecuteScriptAndExtractBool(const ToRenderFrameHost& adapter,
192 const std::string& script, 192 const std::string& script,
193 bool* result) WARN_UNUSED_RESULT; 193 bool* result) WARN_UNUSED_RESULT;
194 bool ExecuteScriptInIsolatedWorldAndExtractBool(
195 const ToRenderFrameHost& adapter,
196 const int world_id,
197 const std::string& script,
198 bool* result) WARN_UNUSED_RESULT;
194 bool ExecuteScriptAndExtractString(const ToRenderFrameHost& adapter, 199 bool ExecuteScriptAndExtractString(const ToRenderFrameHost& adapter,
195 const std::string& script, 200 const std::string& script,
196 std::string* result) WARN_UNUSED_RESULT; 201 std::string* result) WARN_UNUSED_RESULT;
197 202
198 // Walks the frame tree of the specified WebContents and returns the sole frame 203 // Walks the frame tree of the specified WebContents and returns the sole frame
199 // that matches the specified predicate function. This function will DCHECK if 204 // that matches the specified predicate function. This function will DCHECK if
200 // no frames match the specified predicate, or if more than one frame matches. 205 // no frames match the specified predicate, or if more than one frame matches.
201 RenderFrameHost* FrameMatchingPredicate( 206 RenderFrameHost* FrameMatchingPredicate(
202 WebContents* web_contents, 207 WebContents* web_contents,
203 const base::Callback<bool(RenderFrameHost*)>& predicate); 208 const base::Callback<bool(RenderFrameHost*)>& predicate);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 int routing_id_; 469 int routing_id_;
465 bool deleted_; 470 bool deleted_;
466 scoped_ptr<base::RunLoop> runner_; 471 scoped_ptr<base::RunLoop> runner_;
467 472
468 DISALLOW_COPY_AND_ASSIGN(RenderFrameDeletedObserver); 473 DISALLOW_COPY_AND_ASSIGN(RenderFrameDeletedObserver);
469 }; 474 };
470 475
471 } // namespace content 476 } // namespace content
472 477
473 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 478 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698