| Index: net/http/http_server_properties_manager_unittest.cc
|
| diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
|
| index be17d9a02c162f91663931d166a6d0b92020fa6a..92c3ce56633eb6a9d0c27a874d092c2d426eedb7 100644
|
| --- a/net/http/http_server_properties_manager_unittest.cc
|
| +++ b/net/http/http_server_properties_manager_unittest.cc
|
| @@ -526,6 +526,27 @@ TEST_F(HttpServerPropertiesManagerTest, GetAlternativeService) {
|
| EXPECT_EQ(NPN_SPDY_4, alternative_service.protocol);
|
| }
|
|
|
| +TEST_F(HttpServerPropertiesManagerTest, ClearAlternativeService) {
|
| + ExpectPrefsUpdate();
|
| + ExpectScheduleUpdatePrefsOnNetworkThread();
|
| +
|
| + HostPortPair spdy_server_mail("mail.google.com", 80);
|
| + EXPECT_FALSE(HasAlternativeService(spdy_server_mail));
|
| + AlternativeService alternative_service(NPN_SPDY_4, "mail.google.com", 443);
|
| + http_server_props_manager_->SetAlternativeService(spdy_server_mail,
|
| + alternative_service, 1.0);
|
| + ExpectScheduleUpdatePrefsOnNetworkThread();
|
| + http_server_props_manager_->ClearAlternativeService(spdy_server_mail);
|
| + // ExpectScheduleUpdatePrefsOnNetworkThread() should be called only once.
|
| + http_server_props_manager_->ClearAlternativeService(spdy_server_mail);
|
| +
|
| + // Run the task.
|
| + base::RunLoop().RunUntilIdle();
|
| + Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
|
| +
|
| + EXPECT_FALSE(HasAlternativeService(spdy_server_mail));
|
| +}
|
| +
|
| TEST_F(HttpServerPropertiesManagerTest, SupportsQuic) {
|
| ExpectPrefsUpdate();
|
| ExpectScheduleUpdatePrefsOnNetworkThread();
|
|
|