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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. | 177 base::ShadowingAtExitManager at_exit_manager_; // Deletes PluginService. |
178 MessageLoopForIO message_loop_; | 178 MessageLoopForIO message_loop_; |
179 content::TestBrowserThread ui_thread_; | 179 content::TestBrowserThread ui_thread_; |
180 content::TestBrowserThread file_thread_; | 180 content::TestBrowserThread file_thread_; |
181 content::TestBrowserThread io_thread_; | 181 content::TestBrowserThread io_thread_; |
182 webkit::npapi::MockPluginList plugin_list_; | 182 webkit::npapi::MockPluginList plugin_list_; |
183 TestingProfile profile_; | 183 TestingProfile profile_; |
184 scoped_refptr<PluginPrefs> plugin_prefs_; | 184 scoped_refptr<PluginPrefs> plugin_prefs_; |
185 net::URLRequestJobFactoryImpl job_factory_; | 185 net::URLRequestJobFactoryImpl job_factory_; |
186 const net::URLRequestJobFactory* old_factory_; | 186 const net::URLRequestJobFactory* old_factory_; |
187 TestDelegate test_delegate_; | 187 net::TestDelegate test_delegate_; |
188 FilePath pdf_path_; | 188 FilePath pdf_path_; |
189 content::MockResourceContext resource_context_; | 189 content::MockResourceContext resource_context_; |
190 }; | 190 }; |
191 | 191 |
192 TEST_F(GViewRequestInterceptorTest, DoNotInterceptHtml) { | 192 TEST_F(GViewRequestInterceptorTest, DoNotInterceptHtml) { |
193 net::URLRequest request( | 193 net::URLRequest request( |
194 GURL(kHtmlUrl), &test_delegate_, resource_context_.GetRequestContext()); | 194 GURL(kHtmlUrl), &test_delegate_, resource_context_.GetRequestContext()); |
195 SetupRequest(&request); | 195 SetupRequest(&request); |
196 request.Start(); | 196 request.Start(); |
197 MessageLoop::current()->Run(); | 197 MessageLoop::current()->Run(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 SetupRequest(&request); | 288 SetupRequest(&request); |
289 request.Start(); | 289 request.Start(); |
290 MessageLoop::current()->Run(); | 290 MessageLoop::current()->Run(); |
291 EXPECT_EQ(0, test_delegate_.received_redirect_count()); | 291 EXPECT_EQ(0, test_delegate_.received_redirect_count()); |
292 EXPECT_EQ(GURL(kPdfBlob), request.url()); | 292 EXPECT_EQ(GURL(kPdfBlob), request.url()); |
293 } | 293 } |
294 | 294 |
295 } // namespace | 295 } // namespace |
296 | 296 |
297 } // namespace chromeos | 297 } // namespace chromeos |
OLD | NEW |