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 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/chrome_plugin_service_filter.h" | 10 #include "chrome/browser/chrome_plugin_service_filter.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 UnregisterPDFPlugin(); | 152 UnregisterPDFPlugin(); |
153 } | 153 } |
154 is_loaded = PluginService::GetInstance()->GetPluginInfoByPath( | 154 is_loaded = PluginService::GetInstance()->GetPluginInfoByPath( |
155 pdf_path_, &info); | 155 pdf_path_, &info); |
156 ASSERT_EQ(want_loaded, is_loaded); | 156 ASSERT_EQ(want_loaded, is_loaded); |
157 } | 157 } |
158 | 158 |
159 void SetupRequest(net::URLRequest* request) { | 159 void SetupRequest(net::URLRequest* request) { |
160 content::ResourceRequestInfo::AllocateForTesting(request, | 160 content::ResourceRequestInfo::AllocateForTesting(request, |
161 ResourceType::MAIN_FRAME, | 161 ResourceType::MAIN_FRAME, |
162 &resource_context_); | 162 &resource_context_, |
| 163 -1, |
| 164 -1); |
163 request->set_context(resource_context_.GetRequestContext()); | 165 request->set_context(resource_context_.GetRequestContext()); |
164 } | 166 } |
165 | 167 |
166 protected: | 168 protected: |
167 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. | 169 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. |
168 MessageLoopForIO message_loop_; | 170 MessageLoopForIO message_loop_; |
169 content::TestBrowserThread ui_thread_; | 171 content::TestBrowserThread ui_thread_; |
170 content::TestBrowserThread file_thread_; | 172 content::TestBrowserThread file_thread_; |
171 content::TestBrowserThread io_thread_; | 173 content::TestBrowserThread io_thread_; |
172 webkit::npapi::MockPluginList plugin_list_; | 174 webkit::npapi::MockPluginList plugin_list_; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 SetupRequest(&request); | 270 SetupRequest(&request); |
269 request.Start(); | 271 request.Start(); |
270 MessageLoop::current()->Run(); | 272 MessageLoop::current()->Run(); |
271 EXPECT_EQ(0, test_delegate_.received_redirect_count()); | 273 EXPECT_EQ(0, test_delegate_.received_redirect_count()); |
272 EXPECT_EQ(GURL(kPdfBlob), request.url()); | 274 EXPECT_EQ(GURL(kPdfBlob), request.url()); |
273 } | 275 } |
274 | 276 |
275 } // namespace | 277 } // namespace |
276 | 278 |
277 } // namespace chromeos | 279 } // namespace chromeos |
OLD | NEW |