diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
commit | 46b0d4aacbf25108badc143e09f91064fc0b0472 (patch) | |
tree | d1ec74ba60c5c7ae6fd683ad7b685095434e6f03 /chrome/common/resource_dispatcher_unittest.cc | |
parent | 08ae5f310a475f73807df520fa0b50cf7138c4f5 (diff) | |
download | chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.zip chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.gz chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.bz2 |
Add a CreateBridge method to the ChildThread.
The intent is to allow unit-tests that use render view
to override ChildThread::CreateBridge() to provide their
own resource loading.
This is used by the upcoming translate unit-test.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/503032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher_unittest.cc')
-rw-r--r-- | chrome/common/resource_dispatcher_unittest.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc index 67b9351..bf2ec19 100644 --- a/chrome/common/resource_dispatcher_unittest.cc +++ b/chrome/common/resource_dispatcher_unittest.cc @@ -148,11 +148,21 @@ class ResourceDispatcherTest : public testing::Test, } ResourceLoaderBridge* CreateBridge() { - ResourceLoaderBridge* bridge = dispatcher_->CreateBridge( - "GET", GURL(test_page_url), GURL(test_page_url), GURL(), "null", - "null", std::string(), 0, 0, ResourceType::SUB_RESOURCE, 0, - appcache::kNoHostId, MSG_ROUTING_CONTROL, -1, -1); - return bridge; + webkit_glue::ResourceLoaderBridge::RequestInfo request_info; + request_info.method = "GET"; + request_info.url = GURL(test_page_url); + request_info.first_party_for_cookies = GURL(test_page_url); + request_info.referrer = GURL(); + request_info.frame_origin = "null"; + request_info.main_frame_origin = "null"; + request_info.headers = std::string(); + request_info.load_flags = 0; + request_info.requestor_pid = 0; + request_info.request_type = ResourceType::SUB_RESOURCE; + request_info.appcache_host_id = 0; + request_info.routing_id = appcache::kNoHostId; + + return dispatcher_->CreateBridge(request_info, -1, -1); } std::vector<IPC::Message> message_queue_; |