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

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

Issue 2630683003: Revert of Convert more test helpers to base::RunLoop, fix page title checks. (Closed)
Patch Set: 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 <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/run_loop.h"
20 #include "cc/surfaces/surface_id.h" 19 #include "cc/surfaces/surface_id.h"
21 #include "content/public/browser/resource_dispatcher_host_delegate.h" 20 #include "content/public/browser/resource_dispatcher_host_delegate.h"
22 #include "content/public/browser/web_contents_delegate.h" 21 #include "content/public/browser/web_contents_delegate.h"
23 #include "content/public/common/file_chooser_params.h" 22 #include "content/public/common/file_chooser_params.h"
24 #include "content/public/test/browser_test_utils.h" 23 #include "content/public/test/browser_test_utils.h"
25 #include "url/gurl.h" 24 #include "url/gurl.h"
26 25
27 namespace cc { 26 namespace cc {
28 class SurfaceManager; 27 class SurfaceManager;
29 } 28 }
30 29
31 namespace content { 30 namespace content {
32 31
33 class FrameTreeNode; 32 class FrameTreeNode;
33 class MessageLoopRunner;
34 class RenderFrameHost; 34 class RenderFrameHost;
35 class RenderWidgetHostViewChildFrame; 35 class RenderWidgetHostViewChildFrame;
36 class Shell; 36 class Shell;
37 class SiteInstance; 37 class SiteInstance;
38 class ToRenderFrameHost; 38 class ToRenderFrameHost;
39 39
40 // Navigates the frame represented by |node| to |url|, blocking until the 40 // Navigates the frame represented by |node| to |url|, blocking until the
41 // navigation finishes. 41 // navigation finishes.
42 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url); 42 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url);
43 43
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 private: 192 private:
193 void DidFinishNavigation(NavigationHandle* navigation_handle) override; 193 void DidFinishNavigation(NavigationHandle* navigation_handle) override;
194 194
195 // The id of the FrameTreeNode in which navigations are peformed. 195 // The id of the FrameTreeNode in which navigations are peformed.
196 int frame_tree_node_id_; 196 int frame_tree_node_id_;
197 197
198 // The URL this observer is expecting to be committed. 198 // The URL this observer is expecting to be committed.
199 GURL url_; 199 GURL url_;
200 200
201 // The RunLoop used to spin the message loop. 201 // The MessageLoopRunner used to spin the message loop.
202 base::RunLoop run_loop_; 202 scoped_refptr<MessageLoopRunner> message_loop_runner_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(UrlCommitObserver); 204 DISALLOW_COPY_AND_ASSIGN(UrlCommitObserver);
205 }; 205 };
206 206
207 } // namespace content 207 } // namespace content
208 208
209 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_ 209 #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