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

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc

Issue 48038: SSL Fix: Step 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vector> 5 #include <vector>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "chrome/browser/renderer_host/renderer_security_policy.h" 9 #include "chrome/browser/renderer_host/renderer_security_policy.h"
10 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 10 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
(...skipping 18 matching lines...) Expand all
29 return request_id; 29 return request_id;
30 } 30 }
31 31
32 static ViewHostMsg_Resource_Request CreateResourceRequest(const char* method, 32 static ViewHostMsg_Resource_Request CreateResourceRequest(const char* method,
33 const GURL& url) { 33 const GURL& url) {
34 ViewHostMsg_Resource_Request request; 34 ViewHostMsg_Resource_Request request;
35 request.method = std::string(method); 35 request.method = std::string(method);
36 request.url = url; 36 request.url = url;
37 request.policy_url = url; // bypass third-party cookie blocking 37 request.policy_url = url; // bypass third-party cookie blocking
38 // init the rest to default values to prevent getting UMR. 38 // init the rest to default values to prevent getting UMR.
39 request.frame_origin = "null";
40 request.main_frame_origin = "null";
39 request.load_flags = 0; 41 request.load_flags = 0;
40 request.origin_pid = 0; 42 request.origin_pid = 0;
41 request.resource_type = ResourceType::SUB_RESOURCE; 43 request.resource_type = ResourceType::SUB_RESOURCE;
42 request.mixed_content = false;
43 return request; 44 return request;
44 } 45 }
45 46
46 // We may want to move this to a shared space if it is useful for something else 47 // We may want to move this to a shared space if it is useful for something else
47 class ResourceIPCAccumulator { 48 class ResourceIPCAccumulator {
48 public: 49 public:
49 void AddMessage(const IPC::Message& msg) { 50 void AddMessage(const IPC::Message& msg) {
50 messages_.push_back(msg); 51 messages_.push_back(msg);
51 } 52 }
52 53
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 EXPECT_EQ(URLRequestStatus::CANCELED, status.status()); 614 EXPECT_EQ(URLRequestStatus::CANCELED, status.status());
614 EXPECT_EQ(net::ERR_INSUFFICIENT_RESOURCES, status.os_error()); 615 EXPECT_EQ(net::ERR_INSUFFICIENT_RESOURCES, status.os_error());
615 } 616 }
616 617
617 // The final 2 requests should have succeeded. 618 // The final 2 requests should have succeeded.
618 CheckSuccessfulRequest(msgs[kMaxRequests + 2], 619 CheckSuccessfulRequest(msgs[kMaxRequests + 2],
619 URLRequestTestJob::test_data_2()); 620 URLRequestTestJob::test_data_2());
620 CheckSuccessfulRequest(msgs[kMaxRequests + 3], 621 CheckSuccessfulRequest(msgs[kMaxRequests + 3],
621 URLRequestTestJob::test_data_2()); 622 URLRequestTestJob::test_data_2());
622 } 623 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/browser/renderer_host/resource_request_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698