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

Side by Side Diff: content/test/content_browser_test_utils_internal.h

Issue 2635933003: Convert more test helpers to base::RunLoop, fix page title checks. (Reland) (Closed)
Patch Set: Fix ClickModifierTests. Created 3 years, 11 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
« no previous file with comments | « content/public/test/test_utils.cc ('k') | content/test/content_browser_test_utils_internal.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_ 5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_
6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_ 6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_
7 7
8 // A collection of functions designed for use with content_shell based browser 8 // A collection of functions designed for use with content_shell based browser
9 // tests internal to the content/ module. 9 // tests internal to the content/ module.
10 // Note: If a function here also works with browser_tests, it should be in 10 // Note: If a function here also works with browser_tests, it should be in
11 // the content public API. 11 // the content public API.
12 12
13 #include <memory> 13 #include <memory>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/files/file_path.h" 17 #include "base/files/file_path.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/run_loop.h"
20 #include "cc/surfaces/surface_id.h" 21 #include "cc/surfaces/surface_id.h"
21 #include "content/public/browser/resource_dispatcher_host_delegate.h" 22 #include "content/public/browser/resource_dispatcher_host_delegate.h"
22 #include "content/public/browser/web_contents_delegate.h" 23 #include "content/public/browser/web_contents_delegate.h"
23 #include "content/public/common/file_chooser_params.h" 24 #include "content/public/common/file_chooser_params.h"
24 #include "content/public/test/browser_test_utils.h" 25 #include "content/public/test/browser_test_utils.h"
25 #include "url/gurl.h" 26 #include "url/gurl.h"
26 27
27 namespace cc { 28 namespace cc {
28 class SurfaceManager; 29 class SurfaceManager;
29 } 30 }
30 31
31 namespace content { 32 namespace content {
32 33
33 class FrameTreeNode; 34 class FrameTreeNode;
34 class MessageLoopRunner;
35 class RenderFrameHost; 35 class RenderFrameHost;
36 class RenderWidgetHostViewChildFrame; 36 class RenderWidgetHostViewChildFrame;
37 class Shell; 37 class Shell;
38 class SiteInstance; 38 class SiteInstance;
39 class ToRenderFrameHost; 39 class ToRenderFrameHost;
40 40
41 // Navigates the frame represented by |node| to |url|, blocking until the 41 // Navigates the frame represented by |node| to |url|, blocking until the
42 // navigation finishes. 42 // navigation finishes.
43 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url); 43 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url);
44 44
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 private: 193 private:
194 void DidFinishNavigation(NavigationHandle* navigation_handle) override; 194 void DidFinishNavigation(NavigationHandle* navigation_handle) override;
195 195
196 // The id of the FrameTreeNode in which navigations are peformed. 196 // The id of the FrameTreeNode in which navigations are peformed.
197 int frame_tree_node_id_; 197 int frame_tree_node_id_;
198 198
199 // The URL this observer is expecting to be committed. 199 // The URL this observer is expecting to be committed.
200 GURL url_; 200 GURL url_;
201 201
202 // The MessageLoopRunner used to spin the message loop. 202 // The RunLoop used to spin the message loop.
203 scoped_refptr<MessageLoopRunner> message_loop_runner_; 203 base::RunLoop run_loop_;
204 204
205 DISALLOW_COPY_AND_ASSIGN(UrlCommitObserver); 205 DISALLOW_COPY_AND_ASSIGN(UrlCommitObserver);
206 }; 206 };
207 207
208 } // namespace content 208 } // namespace content
209 209
210 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_ 210 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_
OLDNEW
« no previous file with comments | « content/public/test/test_utils.cc ('k') | content/test/content_browser_test_utils_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698