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

Side by Side Diff: net/test/embedded_test_server/embedded_test_server_unittest.cc

Issue 2833983002: Test network annotation tags added to unittests in net/. (Closed)
Patch Set: One file moved. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 "net/test/embedded_test_server/embedded_test_server.h" 5 #include "net/test/embedded_test_server/embedded_test_server.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // (Discover the close event synchronously, asynchronously, or server 451 // (Discover the close event synchronously, asynchronously, or server
452 // shutting down before it is discovered). 452 // shutting down before it is discovered).
453 TEST_P(EmbeddedTestServerTest, CloseDuringWrite) { 453 TEST_P(EmbeddedTestServerTest, CloseDuringWrite) {
454 CancelRequestDelegate cancel_delegate; 454 CancelRequestDelegate cancel_delegate;
455 TestURLRequestContext context; 455 TestURLRequestContext context;
456 cancel_delegate.set_cancel_in_response_started(true); 456 cancel_delegate.set_cancel_in_response_started(true);
457 server_->RegisterRequestHandler(base::Bind( 457 server_->RegisterRequestHandler(base::Bind(
458 &HandlePrefixedRequest, "/infinite", base::Bind(&HandleInfiniteRequest))); 458 &HandlePrefixedRequest, "/infinite", base::Bind(&HandleInfiniteRequest)));
459 ASSERT_TRUE(server_->Start()); 459 ASSERT_TRUE(server_->Start());
460 460
461 std::unique_ptr<URLRequest> request = context.CreateRequest( 461 std::unique_ptr<URLRequest> request =
462 server_->GetURL("/infinite"), DEFAULT_PRIORITY, &cancel_delegate); 462 context.CreateRequest(server_->GetURL("/infinite"), DEFAULT_PRIORITY,
463 &cancel_delegate, TRAFFIC_ANNOTATION_FOR_TESTS);
463 request->Start(); 464 request->Start();
464 cancel_delegate.WaitUntilDone(); 465 cancel_delegate.WaitUntilDone();
465 } 466 }
466 467
467 struct CertificateValuesEntry { 468 struct CertificateValuesEntry {
468 const EmbeddedTestServer::ServerCertificate server_cert; 469 const EmbeddedTestServer::ServerCertificate server_cert;
469 const bool is_expired; 470 const bool is_expired;
470 const char* common_name; 471 const char* common_name;
471 const char* root; 472 const char* root;
472 }; 473 };
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 INSTANTIATE_TEST_CASE_P( 612 INSTANTIATE_TEST_CASE_P(
612 EmbeddedTestServerThreadingTestInstantiation, 613 EmbeddedTestServerThreadingTestInstantiation,
613 EmbeddedTestServerThreadingTest, 614 EmbeddedTestServerThreadingTest,
614 testing::Combine(testing::Bool(), 615 testing::Combine(testing::Bool(),
615 testing::Bool(), 616 testing::Bool(),
616 testing::Values(EmbeddedTestServer::TYPE_HTTP, 617 testing::Values(EmbeddedTestServer::TYPE_HTTP,
617 EmbeddedTestServer::TYPE_HTTPS))); 618 EmbeddedTestServer::TYPE_HTTPS)));
618 619
619 } // namespace test_server 620 } // namespace test_server
620 } // namespace net 621 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_network_transaction_unittest.cc ('k') | net/websockets/websocket_end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698