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

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

Issue 2296483002: Fix some unit_tests under PlzNavigate (Closed)
Patch Set: not in public interface Created 4 years, 3 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_TEST_RENDERER_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_
6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // An interface and utility for driving tests of RenderFrameHost. 49 // An interface and utility for driving tests of RenderFrameHost.
50 class RenderFrameHostTester { 50 class RenderFrameHostTester {
51 public: 51 public:
52 // Retrieves the RenderFrameHostTester that drives the specified 52 // Retrieves the RenderFrameHostTester that drives the specified
53 // RenderFrameHost. The RenderFrameHost must have been created while 53 // RenderFrameHost. The RenderFrameHost must have been created while
54 // RenderFrameHost testing was enabled; use a 54 // RenderFrameHost testing was enabled; use a
55 // RenderViewHostTestEnabler instance (see below) to do this. 55 // RenderViewHostTestEnabler instance (see below) to do this.
56 static RenderFrameHostTester* For(RenderFrameHost* host); 56 static RenderFrameHostTester* For(RenderFrameHost* host);
57 57
58 // If the given NavigationController has a pending main frame, returns it, 58 static void CommitPendingLoad(NavigationController* controller);
59 // otherwise NULL. This is an alternative to
60 // WebContentsTester::GetPendingMainFrame() when your WebContents was not
61 // created via a TestWebContents.
62 static RenderFrameHost* GetPendingForController(
63 NavigationController* controller);
64 59
65 virtual ~RenderFrameHostTester() {} 60 virtual ~RenderFrameHostTester() {}
66 61
67 // Simulates initialization of the RenderFrame object in the renderer process 62 // Simulates initialization of the RenderFrame object in the renderer process
68 // and ensures internal state of RenderFrameHost is ready for simulating 63 // and ensures internal state of RenderFrameHost is ready for simulating
69 // RenderFrame originated IPCs. 64 // RenderFrame originated IPCs.
70 virtual void InitializeRenderFrameIfNeeded() = 0; 65 virtual void InitializeRenderFrameIfNeeded() = 0;
71 66
72 // Gives tests access to RenderFrameHostImpl::OnCreateChild. The returned 67 // Gives tests access to RenderFrameHostImpl::OnCreateChild. The returned
73 // RenderFrameHost is owned by the parent RenderFrameHost. 68 // RenderFrameHost is owned by the parent RenderFrameHost.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_; 277 std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_;
283 #endif 278 #endif
284 RenderViewHostTestEnabler rvh_test_enabler_; 279 RenderViewHostTestEnabler rvh_test_enabler_;
285 280
286 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); 281 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness);
287 }; 282 };
288 283
289 } // namespace content 284 } // namespace content
290 285
291 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ 286 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « content/public/test/browser_side_navigation_test_utils.cc ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698