Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1154)

Unified Diff: net/http/http_stream_factory_impl_request_unittest.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_request.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_request_unittest.cc
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
deleted file mode 100644
index 32900f93e789765da47f0b85ec2e88c6e1131767..0000000000000000000000000000000000000000
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/http/http_stream_factory_impl_request.h"
-
-#include "net/http/http_stream_factory_impl_job.h"
-#include "net/proxy/proxy_info.h"
-#include "net/proxy/proxy_service.h"
-#include "net/spdy/spdy_test_util_common.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace net {
-
-class HttpStreamFactoryImplRequestTest
- : public ::testing::Test,
- public ::testing::WithParamInterface<NextProto> {};
-
-INSTANTIATE_TEST_CASE_P(
- NextProto,
- HttpStreamFactoryImplRequestTest,
- testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
-
-namespace {
-
-class DoNothingRequestDelegate : public HttpStreamRequest::Delegate {
- public:
- DoNothingRequestDelegate() {}
-
- ~DoNothingRequestDelegate() override {}
-
- // HttpStreamRequest::Delegate
- void OnStreamReady(const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStream* stream) override {}
- void OnWebSocketHandshakeStreamReady(
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- WebSocketHandshakeStreamBase* stream) override {}
- void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {}
- void OnCertificateError(int status,
- const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override {}
- void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override {}
- void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override {}
- void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStream* stream) override {}
-};
-
-} // namespace
-
-// Make sure that Request passes on its priority updates to its jobs.
-TEST_P(HttpStreamFactoryImplRequestTest, SetPriority) {
- SpdySessionDependencies session_deps(GetParam(),
- ProxyService::CreateDirect());
-
- scoped_refptr<HttpNetworkSession>
- session(SpdySessionDependencies::SpdyCreateSession(&session_deps));
- HttpStreamFactoryImpl* factory =
- static_cast<HttpStreamFactoryImpl*>(session->http_stream_factory());
-
- DoNothingRequestDelegate request_delegate;
- HttpStreamFactoryImpl::Request request(
- GURL(), factory, &request_delegate, NULL, BoundNetLog());
-
- HttpStreamFactoryImpl::Job* job =
- new HttpStreamFactoryImpl::Job(factory,
- session.get(),
- HttpRequestInfo(),
- DEFAULT_PRIORITY,
- SSLConfig(),
- SSLConfig(),
- NULL);
- request.AttachJob(job);
- EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
-
- request.SetPriority(MEDIUM);
- EXPECT_EQ(MEDIUM, job->priority());
-
- // Make |job| the bound job.
- request.OnStreamFailed(job, ERR_FAILED, SSLConfig());
-
- request.SetPriority(IDLE);
- EXPECT_EQ(IDLE, job->priority());
-}
-
-} // namespace net
« no previous file with comments | « net/http/http_stream_factory_impl_request.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698