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

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

Issue 1852903002: Create an interactive site-per-process browsertest class and move DocumentHasFocus there. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig's comments Created 4 years, 8 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // no frames match the specified predicate, or if more than one frame matches. 228 // no frames match the specified predicate, or if more than one frame matches.
229 RenderFrameHost* FrameMatchingPredicate( 229 RenderFrameHost* FrameMatchingPredicate(
230 WebContents* web_contents, 230 WebContents* web_contents,
231 const base::Callback<bool(RenderFrameHost*)>& predicate); 231 const base::Callback<bool(RenderFrameHost*)>& predicate);
232 232
233 // Predicates for use with FrameMatchingPredicate. 233 // Predicates for use with FrameMatchingPredicate.
234 bool FrameMatchesName(const std::string& name, RenderFrameHost* frame); 234 bool FrameMatchesName(const std::string& name, RenderFrameHost* frame);
235 bool FrameIsChildOfMainFrame(RenderFrameHost* frame); 235 bool FrameIsChildOfMainFrame(RenderFrameHost* frame);
236 bool FrameHasSourceUrl(const GURL& url, RenderFrameHost* frame); 236 bool FrameHasSourceUrl(const GURL& url, RenderFrameHost* frame);
237 237
238 // Finds the child frame at the specified |index| for |frame| and returns its
239 // RenderFrameHost. Returns nullptr if such child frame does not exist.
240 RenderFrameHost* ChildFrameAt(RenderFrameHost* frame, size_t index);
241
238 // Executes the WebUI resource test runner injecting each resource ID in 242 // Executes the WebUI resource test runner injecting each resource ID in
239 // |js_resource_ids| prior to executing the tests. 243 // |js_resource_ids| prior to executing the tests.
240 // 244 //
241 // Returns true if tests ran successfully, false otherwise. 245 // Returns true if tests ran successfully, false otherwise.
242 bool ExecuteWebUIResourceTest(WebContents* web_contents, 246 bool ExecuteWebUIResourceTest(WebContents* web_contents,
243 const std::vector<int>& js_resource_ids); 247 const std::vector<int>& js_resource_ids);
244 248
245 // Returns the cookies for the given url. 249 // Returns the cookies for the given url.
246 std::string GetCookies(BrowserContext* browser_context, const GURL& url); 250 std::string GetCookies(BrowserContext* browser_context, const GURL& url);
247 251
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 blink::WebInputEvent::Type wait_for_type_; 505 blink::WebInputEvent::Type wait_for_type_;
502 uint32_t ack_result_; 506 uint32_t ack_result_;
503 base::Closure quit_; 507 base::Closure quit_;
504 508
505 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher); 509 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher);
506 }; 510 };
507 511
508 } // namespace content 512 } // namespace content
509 513
510 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 514 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698