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

Side by Side Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 1878153002: Revert of Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
11 #include "content/browser/frame_host/render_frame_host_impl.h" 11 #include "content/browser/frame_host/render_frame_host_impl.h"
12 #include "content/browser/renderer_host/render_message_filter.h" 12 #include "content/browser/renderer_host/render_message_filter.h"
13 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 13 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
14 #include "content/browser/renderer_host/render_widget_helper.h" 14 #include "content/browser/renderer_host/render_widget_helper.h"
15 #include "content/common/frame_messages.h" 15 #include "content/common/frame_messages.h"
16 #include "content/common/input_messages.h" 16 #include "content/common/input_messages.h"
17 #include "content/common/view_messages.h" 17 #include "content/common/view_messages.h"
18 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
19 #include "content/public/browser/navigation_entry.h" 19 #include "content/public/browser/navigation_entry.h"
20 #include "content/public/browser/storage_partition.h"
21 #include "content/public/common/bindings_policy.h" 20 #include "content/public/common/bindings_policy.h"
22 #include "content/public/common/drop_data.h" 21 #include "content/public/common/drop_data.h"
23 #include "content/public/common/url_constants.h" 22 #include "content/public/common/url_constants.h"
24 #include "content/public/test/mock_render_process_host.h" 23 #include "content/public/test/mock_render_process_host.h"
25 #include "content/test/test_content_browser_client.h" 24 #include "content/test/test_content_browser_client.h"
26 #include "content/test/test_render_view_host.h" 25 #include "content/test/test_render_view_host.h"
27 #include "content/test/test_web_contents.h" 26 #include "content/test/test_web_contents.h"
28 #include "net/base/filename_util.h" 27 #include "net/base/filename_util.h"
29 #include "third_party/WebKit/public/web/WebDragOperation.h" 28 #include "third_party/WebKit/public/web/WebDragOperation.h"
30 #include "ui/base/page_transition_types.h" 29 #include "ui/base/page_transition_types.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 EXPECT_NE(test_rvh()->GetRoutingID(), root_rfh->routing_id()); 241 EXPECT_NE(test_rvh()->GetRoutingID(), root_rfh->routing_id());
243 } 242 }
244 243
245 class TestSaveImageFromDataURL : public RenderMessageFilter { 244 class TestSaveImageFromDataURL : public RenderMessageFilter {
246 public: 245 public:
247 TestSaveImageFromDataURL( 246 TestSaveImageFromDataURL(
248 BrowserContext* context) 247 BrowserContext* context)
249 : RenderMessageFilter( 248 : RenderMessageFilter(
250 0, 249 0,
251 context, 250 context,
252 BrowserContext::GetDefaultStoragePartition(context)-> 251 context->GetRequestContext(),
253 GetURLRequestContext(),
254 nullptr, 252 nullptr,
255 nullptr, 253 nullptr,
256 nullptr, 254 nullptr,
257 nullptr) { 255 nullptr) {
258 Reset(); 256 Reset();
259 } 257 }
260 258
261 void Reset() { 259 void Reset() {
262 url_string_ = std::string(); 260 url_string_ = std::string();
263 is_downloaded_ = false; 261 is_downloaded_ = false;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 const std::string data_url = "data:image/gif;base64," 302 const std::string data_url = "data:image/gif;base64,"
305 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="; 303 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
306 304
307 tester->Reset(); 305 tester->Reset();
308 tester->Test(data_url); 306 tester->Test(data_url);
309 EXPECT_EQ(tester->UrlString(), data_url); 307 EXPECT_EQ(tester->UrlString(), data_url);
310 EXPECT_TRUE(tester->IsDownloaded()); 308 EXPECT_TRUE(tester->IsDownloaded());
311 } 309 }
312 310
313 } // namespace content 311 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/cdm/browser_cdm_manager.cc ('k') | content/browser/shared_worker/shared_worker_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698