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

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

Issue 7601011: Fix resource loads dropped when iframe is transferred to a new window and original window closes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crash in tests (RenderThread::current() is NULL) Created 9 years, 4 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
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 webkit_glue::ResourceLoaderBridge::RequestInfo request_info; 162 webkit_glue::ResourceLoaderBridge::RequestInfo request_info;
163 request_info.method = "GET"; 163 request_info.method = "GET";
164 request_info.url = GURL(test_page_url); 164 request_info.url = GURL(test_page_url);
165 request_info.first_party_for_cookies = GURL(test_page_url); 165 request_info.first_party_for_cookies = GURL(test_page_url);
166 request_info.referrer = GURL(); 166 request_info.referrer = GURL();
167 request_info.headers = std::string(); 167 request_info.headers = std::string();
168 request_info.load_flags = 0; 168 request_info.load_flags = 0;
169 request_info.requestor_pid = 0; 169 request_info.requestor_pid = 0;
170 request_info.request_type = ResourceType::SUB_RESOURCE; 170 request_info.request_type = ResourceType::SUB_RESOURCE;
171 request_info.appcache_host_id = appcache::kNoHostId; 171 request_info.appcache_host_id = appcache::kNoHostId;
172 request_info.identifier = 0;
172 request_info.routing_id = 0; 173 request_info.routing_id = 0;
173 request_info.is_main_frame = true; 174 request_info.is_main_frame = true;
174 request_info.frame_id = 0; 175 request_info.frame_id = 0;
175 176
176 return dispatcher_->CreateBridge(request_info); 177 return dispatcher_->CreateBridge(request_info);
177 } 178 }
178 179
179 std::vector<IPC::Message> message_queue_; 180 std::vector<IPC::Message> message_queue_;
180 static scoped_ptr<ResourceDispatcher> dispatcher_; 181 static scoped_ptr<ResourceDispatcher> dispatcher_;
181 }; 182 };
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 331
331 ResourceLoaderBridge* bridge = CreateBridge(); 332 ResourceLoaderBridge* bridge = CreateBridge();
332 333
333 bridge->Start(this); 334 bridge->Start(this);
334 InitMessages(); 335 InitMessages();
335 336
336 // Dispatch deferred messages. 337 // Dispatch deferred messages.
337 message_loop.RunAllPending(); 338 message_loop.RunAllPending();
338 delete bridge; 339 delete bridge;
339 } 340 }
OLDNEW
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698