| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // need it to be "enabled" for the test. | 148 // need it to be "enabled" for the test. |
| 149 RegisterPDFPlugin(); | 149 RegisterPDFPlugin(); |
| 150 is_loaded = PluginService::GetInstance()->GetPluginInfoByPath( | 150 is_loaded = PluginService::GetInstance()->GetPluginInfoByPath( |
| 151 pdf_path_, &info); | 151 pdf_path_, &info); |
| 152 } | 152 } |
| 153 EXPECT_EQ(want_loaded, is_loaded); | 153 EXPECT_EQ(want_loaded, is_loaded); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void SetupRequest(net::URLRequest* request) { | 156 void SetupRequest(net::URLRequest* request) { |
| 157 content::ResourceRequestInfo::AllocateForTesting(request, | 157 content::ResourceRequestInfo::AllocateForTesting(request, |
| 158 ResourceType::MAIN_FRAME, |
| 158 &resource_context_); | 159 &resource_context_); |
| 159 request->set_context(resource_context_.GetRequestContext()); | 160 request->set_context(resource_context_.GetRequestContext()); |
| 160 } | 161 } |
| 161 | 162 |
| 162 protected: | 163 protected: |
| 163 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. | 164 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. |
| 164 MessageLoopForIO message_loop_; | 165 MessageLoopForIO message_loop_; |
| 165 content::TestBrowserThread ui_thread_; | 166 content::TestBrowserThread ui_thread_; |
| 166 content::TestBrowserThread file_thread_; | 167 content::TestBrowserThread file_thread_; |
| 167 content::TestBrowserThread io_thread_; | 168 content::TestBrowserThread io_thread_; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 SetupRequest(&request); | 263 SetupRequest(&request); |
| 263 request.Start(); | 264 request.Start(); |
| 264 MessageLoop::current()->Run(); | 265 MessageLoop::current()->Run(); |
| 265 EXPECT_EQ(0, test_delegate_.received_redirect_count()); | 266 EXPECT_EQ(0, test_delegate_.received_redirect_count()); |
| 266 EXPECT_EQ(GURL(kPdfBlob), request.url()); | 267 EXPECT_EQ(GURL(kPdfBlob), request.url()); |
| 267 } | 268 } |
| 268 | 269 |
| 269 } // namespace | 270 } // namespace |
| 270 | 271 |
| 271 } // namespace chromeos | 272 } // namespace chromeos |
| OLD | NEW |