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

Side by Side Diff: net/http/http_server_properties_manager_unittest.cc

Issue 2944043002: Add NetLog events for HttpServerPropertiesManager (Closed)
Patch Set: address droger comment Created 3 years, 6 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
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/http/http_server_properties_manager.h" 5 #include "net/http/http_server_properties_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 79 };
80 80
81 class TestingHttpServerPropertiesManager : public HttpServerPropertiesManager { 81 class TestingHttpServerPropertiesManager : public HttpServerPropertiesManager {
82 public: 82 public:
83 TestingHttpServerPropertiesManager( 83 TestingHttpServerPropertiesManager(
84 HttpServerPropertiesManager::PrefDelegate* pref_delegate, 84 HttpServerPropertiesManager::PrefDelegate* pref_delegate,
85 scoped_refptr<TestMockTimeTaskRunner> pref_task_runner, 85 scoped_refptr<TestMockTimeTaskRunner> pref_task_runner,
86 scoped_refptr<TestMockTimeTaskRunner> net_task_runner) 86 scoped_refptr<TestMockTimeTaskRunner> net_task_runner)
87 : HttpServerPropertiesManager(pref_delegate, 87 : HttpServerPropertiesManager(pref_delegate,
88 pref_task_runner, 88 pref_task_runner,
89 net_task_runner), 89 net_task_runner,
90 nullptr),
90 pref_task_runner_(std::move(pref_task_runner)), 91 pref_task_runner_(std::move(pref_task_runner)),
91 net_task_runner_(std::move(net_task_runner)) { 92 net_task_runner_(std::move(net_task_runner)) {
92 // This call must run in the context of |net_task_runner_|. 93 // This call must run in the context of |net_task_runner_|.
93 TestMockTimeTaskRunner::ScopedContext scoped_context(net_task_runner_); 94 TestMockTimeTaskRunner::ScopedContext scoped_context(net_task_runner_);
94 HttpServerPropertiesManager::InitializeOnNetworkSequence(); 95 HttpServerPropertiesManager::InitializeOnNetworkSequence();
95 } 96 }
96 97
97 ~TestingHttpServerPropertiesManager() override {} 98 ~TestingHttpServerPropertiesManager() override {}
98 99
99 // Make these methods public for testing. 100 // Make these methods public for testing.
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 pref_test_task_runner_->FastForwardUntilNoTasksRemain(); 1565 pref_test_task_runner_->FastForwardUntilNoTasksRemain();
1565 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1566 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1566 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1567 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1567 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 1568 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
1568 http_server_props_manager_.reset(); 1569 http_server_props_manager_.reset();
1569 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1570 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1570 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1571 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1571 } 1572 }
1572 1573
1573 } // namespace net 1574 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698