| OLD | NEW |
| 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 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/extensions/extension_info_map.h" | 10 #include "chrome/browser/extensions/extension_info_map.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 void StartRequest(net::URLRequest* request, | 102 void StartRequest(net::URLRequest* request, |
| 103 ResourceType::Type resource_type) { | 103 ResourceType::Type resource_type) { |
| 104 content::ResourceRequestInfo::AllocateForTesting(request, | 104 content::ResourceRequestInfo::AllocateForTesting(request, |
| 105 resource_type, | 105 resource_type, |
| 106 &resource_context_, | 106 &resource_context_, |
| 107 -1, | 107 -1, |
| 108 -1); | 108 -1); |
| 109 request->Start(); | 109 request->Start(); |
| 110 MessageLoop::current()->Run(); | 110 base::MessageLoop::current()->Run(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 protected: | 113 protected: |
| 114 MessageLoopForIO message_loop_; | 114 base::MessageLoopForIO message_loop_; |
| 115 content::TestBrowserThread ui_thread_; | 115 content::TestBrowserThread ui_thread_; |
| 116 content::TestBrowserThread file_thread_; | 116 content::TestBrowserThread file_thread_; |
| 117 content::TestBrowserThread io_thread_; | 117 content::TestBrowserThread io_thread_; |
| 118 scoped_refptr<ExtensionInfoMap> extension_info_map_; | 118 scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 119 net::URLRequestJobFactoryImpl job_factory_; | 119 net::URLRequestJobFactoryImpl job_factory_; |
| 120 const net::URLRequestJobFactory* old_factory_; | 120 const net::URLRequestJobFactory* old_factory_; |
| 121 net::TestDelegate test_delegate_; | 121 net::TestDelegate test_delegate_; |
| 122 content::MockResourceContext resource_context_; | 122 content::MockResourceContext resource_context_; |
| 123 }; | 123 }; |
| 124 | 124 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 216 { |
| 217 net::URLRequest request(extension->GetResourceURL("webstore_icon_16.png"), | 217 net::URLRequest request(extension->GetResourceURL("webstore_icon_16.png"), |
| 218 &test_delegate_, | 218 &test_delegate_, |
| 219 resource_context_.GetRequestContext()); | 219 resource_context_.GetRequestContext()); |
| 220 StartRequest(&request, ResourceType::MEDIA); | 220 StartRequest(&request, ResourceType::MEDIA); |
| 221 EXPECT_EQ(net::URLRequestStatus::SUCCESS, request.status().status()); | 221 EXPECT_EQ(net::URLRequestStatus::SUCCESS, request.status().status()); |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace extensions | 225 } // namespace extensions |
| OLD | NEW |