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

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

Issue 663043004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 net::SupportsQuicMap* supports_quic_map)); 80 net::SupportsQuicMap* supports_quic_map));
81 81
82 private: 82 private:
83 DISALLOW_COPY_AND_ASSIGN(TestingHttpServerPropertiesManager); 83 DISALLOW_COPY_AND_ASSIGN(TestingHttpServerPropertiesManager);
84 }; 84 };
85 85
86 class HttpServerPropertiesManagerTest : public testing::Test { 86 class HttpServerPropertiesManagerTest : public testing::Test {
87 protected: 87 protected:
88 HttpServerPropertiesManagerTest() {} 88 HttpServerPropertiesManagerTest() {}
89 89
90 virtual void SetUp() override { 90 void SetUp() override {
91 pref_service_.registry()->RegisterDictionaryPref(kTestHttpServerProperties); 91 pref_service_.registry()->RegisterDictionaryPref(kTestHttpServerProperties);
92 http_server_props_manager_.reset( 92 http_server_props_manager_.reset(
93 new StrictMock<TestingHttpServerPropertiesManager>( 93 new StrictMock<TestingHttpServerPropertiesManager>(
94 &pref_service_, 94 &pref_service_,
95 kTestHttpServerProperties, 95 kTestHttpServerProperties,
96 base::MessageLoop::current()->message_loop_proxy())); 96 base::MessageLoop::current()->message_loop_proxy()));
97 ExpectCacheUpdate(); 97 ExpectCacheUpdate();
98 base::RunLoop().RunUntilIdle(); 98 base::RunLoop().RunUntilIdle();
99 } 99 }
100 100
101 virtual void TearDown() override { 101 void TearDown() override {
102 if (http_server_props_manager_.get()) 102 if (http_server_props_manager_.get())
103 http_server_props_manager_->ShutdownOnPrefThread(); 103 http_server_props_manager_->ShutdownOnPrefThread();
104 base::RunLoop().RunUntilIdle(); 104 base::RunLoop().RunUntilIdle();
105 http_server_props_manager_.reset(); 105 http_server_props_manager_.reset();
106 } 106 }
107 107
108 void ExpectCacheUpdate() { 108 void ExpectCacheUpdate() {
109 EXPECT_CALL(*http_server_props_manager_, UpdateCacheFromPrefsOnPrefThread()) 109 EXPECT_CALL(*http_server_props_manager_, UpdateCacheFromPrefsOnPrefThread())
110 .WillOnce(Invoke(http_server_props_manager_.get(), 110 .WillOnce(Invoke(http_server_props_manager_.get(),
111 &TestingHttpServerPropertiesManager:: 111 &TestingHttpServerPropertiesManager::
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // Run the task after shutdown, but before deletion. 528 // Run the task after shutdown, but before deletion.
529 base::RunLoop().RunUntilIdle(); 529 base::RunLoop().RunUntilIdle();
530 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 530 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
531 http_server_props_manager_.reset(); 531 http_server_props_manager_.reset();
532 base::RunLoop().RunUntilIdle(); 532 base::RunLoop().RunUntilIdle();
533 } 533 }
534 534
535 } // namespace 535 } // namespace
536 536
537 } // namespace net 537 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_body_drainer_unittest.cc ('k') | net/http/transport_security_persister_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698