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

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

Issue 10886047: Pepper: Add a X-Requested-With header to URL requests done for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 8 years 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) 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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 request_info.first_party_for_cookies = GURL(test_page_url); 169 request_info.first_party_for_cookies = GURL(test_page_url);
170 request_info.referrer = GURL(); 170 request_info.referrer = GURL();
171 request_info.headers = std::string(); 171 request_info.headers = std::string();
172 request_info.load_flags = 0; 172 request_info.load_flags = 0;
173 request_info.requestor_pid = 0; 173 request_info.requestor_pid = 0;
174 request_info.request_type = ResourceType::SUB_RESOURCE; 174 request_info.request_type = ResourceType::SUB_RESOURCE;
175 request_info.appcache_host_id = appcache::kNoHostId; 175 request_info.appcache_host_id = appcache::kNoHostId;
176 request_info.routing_id = 0; 176 request_info.routing_id = 0;
177 RequestExtraData extra_data(WebKit::WebReferrerPolicyDefault, 177 RequestExtraData extra_data(WebKit::WebReferrerPolicyDefault,
178 WebKit::WebString(), 178 WebKit::WebString(),
179 WebKit::WebString(),
179 true, 0, false, -1, true, 180 true, 0, false, -1, true,
180 PAGE_TRANSITION_LINK, -1, -1); 181 PAGE_TRANSITION_LINK, -1, -1);
181 request_info.extra_data = &extra_data; 182 request_info.extra_data = &extra_data;
182 183
183 return dispatcher_->CreateBridge(request_info); 184 return dispatcher_->CreateBridge(request_info);
184 } 185 }
185 186
186 std::vector<IPC::Message> message_queue_; 187 std::vector<IPC::Message> message_queue_;
187 static scoped_ptr<ResourceDispatcher> dispatcher_; 188 static scoped_ptr<ResourceDispatcher> dispatcher_;
188 }; 189 };
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 ResourceResponseHead response_head; 429 ResourceResponseHead response_head;
429 response_head.error_code = net::OK; 430 response_head.error_code = net::OK;
430 431
431 PerformTest(response_head); 432 PerformTest(response_head);
432 433
433 EXPECT_EQ(0, response_info().load_timing.base_ticks.ToInternalValue()); 434 EXPECT_EQ(0, response_info().load_timing.base_ticks.ToInternalValue());
434 EXPECT_EQ(-1, response_info().load_timing.dns_start); 435 EXPECT_EQ(-1, response_info().load_timing.dns_start);
435 } 436 }
436 437
437 } // namespace content 438 } // namespace content
OLDNEW
« no previous file with comments | « content/common/request_extra_data.cc ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698