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

Side by Side Diff: content/child/resource_dispatcher_unittest.cc

Issue 736743003: Use content::Referrer to pass around referrers in the plugin code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 years, 1 month 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/child/resource_dispatcher.cc ('k') | content/child/web_url_loader_impl.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 (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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } 315 }
316 316
317 ResourceDispatcher* dispatcher() { return &dispatcher_; } 317 ResourceDispatcher* dispatcher() { return &dispatcher_; }
318 318
319 private: 319 private:
320 ResourceLoaderBridge* CreateBridgeInternal(bool download_to_file) { 320 ResourceLoaderBridge* CreateBridgeInternal(bool download_to_file) {
321 RequestInfo request_info; 321 RequestInfo request_info;
322 request_info.method = "GET"; 322 request_info.method = "GET";
323 request_info.url = GURL(kTestPageUrl); 323 request_info.url = GURL(kTestPageUrl);
324 request_info.first_party_for_cookies = GURL(kTestPageUrl); 324 request_info.first_party_for_cookies = GURL(kTestPageUrl);
325 request_info.referrer = GURL(); 325 request_info.referrer = Referrer();
326 request_info.headers = std::string(); 326 request_info.headers = std::string();
327 request_info.load_flags = 0; 327 request_info.load_flags = 0;
328 request_info.requestor_pid = 0; 328 request_info.requestor_pid = 0;
329 request_info.request_type = RESOURCE_TYPE_SUB_RESOURCE; 329 request_info.request_type = RESOURCE_TYPE_SUB_RESOURCE;
330 request_info.appcache_host_id = kAppCacheNoHostId; 330 request_info.appcache_host_id = kAppCacheNoHostId;
331 request_info.routing_id = 0; 331 request_info.routing_id = 0;
332 request_info.download_to_file = download_to_file; 332 request_info.download_to_file = download_to_file;
333 RequestExtraData extra_data; 333 RequestExtraData extra_data;
334 request_info.extra_data = &extra_data; 334 request_info.extra_data = &extra_data;
335 335
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 ResourceResponseHead response_head; 781 ResourceResponseHead response_head;
782 782
783 PerformTest(response_head); 783 PerformTest(response_head);
784 784
785 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); 785 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start);
786 EXPECT_EQ(base::TimeTicks(), 786 EXPECT_EQ(base::TimeTicks(),
787 response_info().load_timing.connect_timing.dns_start); 787 response_info().load_timing.connect_timing.dns_start);
788 } 788 }
789 789
790 } // namespace content 790 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698