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

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

Issue 2319733002: PlzNavigate: Fix DownloadRequestLimiterTest.DownloadRequestLimiter_RendererInitiated (Closed)
Patch Set: rebase 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // If set, future loads will have |mime_type| set as the mime type. 120 // If set, future loads will have |mime_type| set as the mime type.
121 // If not set, the mime type will default to "text/html". 121 // If not set, the mime type will default to "text/html".
122 virtual void SetContentsMimeType(const std::string& mime_type) = 0; 122 virtual void SetContentsMimeType(const std::string& mime_type) = 0;
123 123
124 // Calls OnBeforeUnloadACK on this RenderFrameHost with the given parameter. 124 // Calls OnBeforeUnloadACK on this RenderFrameHost with the given parameter.
125 virtual void SendBeforeUnloadACK(bool proceed) = 0; 125 virtual void SendBeforeUnloadACK(bool proceed) = 0;
126 126
127 // Simulates the SwapOut_ACK that fires if you commit a cross-site 127 // Simulates the SwapOut_ACK that fires if you commit a cross-site
128 // navigation without making any network requests. 128 // navigation without making any network requests.
129 virtual void SimulateSwapOutACK() = 0; 129 virtual void SimulateSwapOutACK() = 0;
130
131 // Simulate a renderer-initiated navigation up until commit.
132 virtual void NavigateAndCommitRendererInitiated(int page_id,
133 bool did_create_new_entry,
134 const GURL& url) = 0;
130 }; 135 };
131 136
132 // An interface and utility for driving tests of RenderViewHost. 137 // An interface and utility for driving tests of RenderViewHost.
133 class RenderViewHostTester { 138 class RenderViewHostTester {
134 public: 139 public:
135 // Retrieves the RenderViewHostTester that drives the specified 140 // Retrieves the RenderViewHostTester that drives the specified
136 // RenderViewHost. The RenderViewHost must have been created while 141 // RenderViewHost. The RenderViewHost must have been created while
137 // RenderViewHost testing was enabled; use a 142 // RenderViewHost testing was enabled; use a
138 // RenderViewHostTestEnabler instance (see below) to do this. 143 // RenderViewHostTestEnabler instance (see below) to do this.
139 static RenderViewHostTester* For(RenderViewHost* host); 144 static RenderViewHostTester* For(RenderViewHost* host);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 std::unique_ptr<MockGpuChannelEstablishFactory> gpu_channel_factory_; 286 std::unique_ptr<MockGpuChannelEstablishFactory> gpu_channel_factory_;
282 #endif 287 #endif
283 RenderViewHostTestEnabler rvh_test_enabler_; 288 RenderViewHostTestEnabler rvh_test_enabler_;
284 289
285 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); 290 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness);
286 }; 291 };
287 292
288 } // namespace content 293 } // namespace content
289 294
290 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ 295 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_request_limiter_unittest.cc ('k') | content/test/test_render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698