OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Tests for the top plugins to catch regressions in our plugin host code, as | 5 // Tests for the top plugins to catch regressions in our plugin host code, as |
6 // well as in the out of process code. Currently this tests: | 6 // well as in the out of process code. Currently this tests: |
7 // Flash | 7 // Flash |
8 // Real | 8 // Real |
9 // QuickTime | 9 // QuickTime |
10 // Windows Media Player | 10 // Windows Media Player |
(...skipping 27 matching lines...) Expand all Loading... | |
38 #include "chrome/common/chrome_paths.h" | 38 #include "chrome/common/chrome_paths.h" |
39 #include "chrome/test/automation/tab_proxy.h" | 39 #include "chrome/test/automation/tab_proxy.h" |
40 #include "chrome/test/ui/ui_test.h" | 40 #include "chrome/test/ui/ui_test.h" |
41 #include "net/base/capturing_net_log.h" | 41 #include "net/base/capturing_net_log.h" |
42 #include "net/base/cert_verifier.h" | 42 #include "net/base/cert_verifier.h" |
43 #include "net/base/host_resolver.h" | 43 #include "net/base/host_resolver.h" |
44 #include "net/base/net_util.h" | 44 #include "net/base/net_util.h" |
45 #include "net/base/ssl_config_service_defaults.h" | 45 #include "net/base/ssl_config_service_defaults.h" |
46 #include "net/http/http_auth_handler_factory.h" | 46 #include "net/http/http_auth_handler_factory.h" |
47 #include "net/http/http_cache.h" | 47 #include "net/http/http_cache.h" |
48 #include "net/http/http_network_layer.h" | 48 #include "net/http/http_network_session.h" |
49 #include "net/socket/client_socket_factory.h" | |
50 #include "net/spdy/spdy_session_pool.h" | |
49 #include "net/url_request/url_request_context.h" | 51 #include "net/url_request/url_request_context.h" |
50 #include "net/url_request/url_request_status.h" | 52 #include "net/url_request/url_request_status.h" |
51 #include "third_party/npapi/bindings/npapi.h" | 53 #include "third_party/npapi/bindings/npapi.h" |
52 #include "webkit/plugins/npapi/plugin_constants_win.h" | 54 #include "webkit/plugins/npapi/plugin_constants_win.h" |
53 #include "webkit/plugins/npapi/plugin_list.h" | 55 #include "webkit/plugins/npapi/plugin_list.h" |
54 #include "webkit/plugins/plugin_switches.h" | 56 #include "webkit/plugins/plugin_switches.h" |
55 | 57 |
56 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
57 #include "base/win/registry.h" | 59 #include "base/win/registry.h" |
58 #endif | 60 #endif |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 const size_t kNetLogBound = 50u; | 278 const size_t kNetLogBound = 50u; |
277 net_log_.reset(new net::CapturingNetLog(kNetLogBound)); | 279 net_log_.reset(new net::CapturingNetLog(kNetLogBound)); |
278 | 280 |
279 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( | 281 proxy_service_ = net::ProxyService::CreateUsingSystemProxyResolver( |
280 proxy_config_service, 0, net_log_.get()); | 282 proxy_config_service, 0, net_log_.get()); |
281 DCHECK(proxy_service_); | 283 DCHECK(proxy_service_); |
282 | 284 |
283 ssl_config_service_ = new net::SSLConfigServiceDefaults; | 285 ssl_config_service_ = new net::SSLConfigServiceDefaults; |
284 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( | 286 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault( |
285 host_resolver_); | 287 host_resolver_); |
288 scoped_refptr<net::HttpNetworkSession> network_session( | |
289 new net::HttpNetworkSession( | |
290 host_resolver_, | |
291 cert_verifier_, | |
292 NULL /* dnsrr_resolver */, | |
293 NULL /* dns_cert_checker */, | |
294 NULL /* ssl_host_info_factory */, | |
295 proxy_service_, | |
296 net::ClientSocketFactory::GetDefaultFactory(), | |
297 ssl_config_service_, | |
298 new net::SpdySessionPool(NULL), | |
299 http_auth_handler_factory_, | |
300 network_delegate_, | |
301 NULL)); | |
wtc
2011/01/28 01:51:23
Nit: add /* net_log */ after this NULL?
| |
286 http_transaction_factory_ = new net::HttpCache( | 302 http_transaction_factory_ = new net::HttpCache( |
287 net::HttpNetworkLayer::CreateFactory(host_resolver_, | 303 network_session, |
288 cert_verifier_, | |
289 NULL /* dnsrr_resolver */, | |
290 NULL /* dns_cert_checker */, | |
291 NULL /* ssl_host_info_factory */, | |
292 proxy_service_, | |
293 ssl_config_service_, | |
294 http_auth_handler_factory_, | |
295 network_delegate_, | |
296 NULL), | |
297 NULL /* net_log */, | |
298 net::HttpCache::DefaultBackend::InMemory(0)); | 304 net::HttpCache::DefaultBackend::InMemory(0)); |
299 } | 305 } |
300 | 306 |
301 private: | 307 private: |
302 scoped_ptr<net::NetLog> net_log_; | 308 scoped_ptr<net::NetLog> net_log_; |
303 scoped_ptr<net::URLSecurityManager> url_security_manager_; | 309 scoped_ptr<net::URLSecurityManager> url_security_manager_; |
304 }; | 310 }; |
305 | 311 |
306 PluginInstallerDownloadTest() | 312 PluginInstallerDownloadTest() |
307 : success_(false), | 313 : success_(false), |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
352 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { | 358 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { |
353 MessageLoop loop(MessageLoop::TYPE_IO); | 359 MessageLoop loop(MessageLoop::TYPE_IO); |
354 Start(); | 360 Start(); |
355 loop.Run(); | 361 loop.Run(); |
356 | 362 |
357 EXPECT_TRUE(success()); | 363 EXPECT_TRUE(success()); |
358 EXPECT_TRUE(initial_download_path().BaseName().value() == | 364 EXPECT_TRUE(initial_download_path().BaseName().value() == |
359 final_download_path().BaseName().value()); | 365 final_download_path().BaseName().value()); |
360 } | 366 } |
361 #endif // defined(OS_WIN) | 367 #endif // defined(OS_WIN) |
OLD | NEW |