OLD | NEW |
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/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ptr_util.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
18 #include "base/test/test_simple_task_runner.h" | 19 #include "base/test/test_simple_task_runner.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
20 #include "base/values.h" | 21 #include "base/values.h" |
21 #include "net/base/ip_address.h" | 22 #include "net/base/ip_address.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 alternative_service_list0->Append(std::move(alternative_service_dict1)); | 257 alternative_service_list0->Append(std::move(alternative_service_dict1)); |
257 server_pref_dict->SetWithoutPathExpansion("alternative_service", | 258 server_pref_dict->SetWithoutPathExpansion("alternative_service", |
258 alternative_service_list0); | 259 alternative_service_list0); |
259 | 260 |
260 // Set up ServerNetworkStats for https://www.google.com. | 261 // Set up ServerNetworkStats for https://www.google.com. |
261 base::DictionaryValue* stats = new base::DictionaryValue; | 262 base::DictionaryValue* stats = new base::DictionaryValue; |
262 stats->SetInteger("srtt", 10); | 263 stats->SetInteger("srtt", 10); |
263 server_pref_dict->SetWithoutPathExpansion("network_stats", stats); | 264 server_pref_dict->SetWithoutPathExpansion("network_stats", stats); |
264 | 265 |
265 // Set the server preference for https://www.google.com. | 266 // Set the server preference for https://www.google.com. |
266 base::DictionaryValue* servers_dict = new base::DictionaryValue; | 267 auto servers_dict = base::MakeUnique<base::DictionaryValue>(); |
267 servers_dict->SetWithoutPathExpansion( | 268 servers_dict->SetWithoutPathExpansion( |
268 GetParam() >= 5 ? "https://www.google.com" : "www.google.com:443", | 269 GetParam() >= 5 ? "https://www.google.com" : "www.google.com:443", |
269 server_pref_dict); | 270 server_pref_dict); |
270 base::ListValue* servers_list = nullptr; | 271 base::ListValue* servers_list = nullptr; |
271 if (GetParam() >= 4) { | 272 if (GetParam() >= 4) { |
272 servers_list = new base::ListValue; | 273 servers_list = new base::ListValue; |
273 // |servers_list| takes ownership of |servers_dict|. | 274 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
274 servers_list->AppendIfNotPresent(servers_dict); | 275 servers_dict = base::MakeUnique<base::DictionaryValue>(); |
275 servers_dict = new base::DictionaryValue; | |
276 } | 276 } |
277 | 277 |
278 // Set the preference for mail.google.com server. | 278 // Set the preference for mail.google.com server. |
279 base::DictionaryValue* server_pref_dict1 = new base::DictionaryValue; | 279 base::DictionaryValue* server_pref_dict1 = new base::DictionaryValue; |
280 | 280 |
281 // Set supports_spdy for https://mail.google.com. | 281 // Set supports_spdy for https://mail.google.com. |
282 server_pref_dict1->SetBoolean("supports_spdy", true); | 282 server_pref_dict1->SetBoolean("supports_spdy", true); |
283 | 283 |
284 // Set up alternative_services for https://mail.google.com. | 284 // Set up alternative_services for https://mail.google.com. |
285 std::unique_ptr<base::DictionaryValue> alternative_service_dict2( | 285 std::unique_ptr<base::DictionaryValue> alternative_service_dict2( |
286 new base::DictionaryValue); | 286 new base::DictionaryValue); |
287 alternative_service_dict2->SetString("protocol_str", "npn-spdy/3.1"); | 287 alternative_service_dict2->SetString("protocol_str", "npn-spdy/3.1"); |
288 alternative_service_dict2->SetInteger("port", 444); | 288 alternative_service_dict2->SetInteger("port", 444); |
289 base::ListValue* alternative_service_list1 = new base::ListValue; | 289 base::ListValue* alternative_service_list1 = new base::ListValue; |
290 alternative_service_list1->Append(std::move(alternative_service_dict2)); | 290 alternative_service_list1->Append(std::move(alternative_service_dict2)); |
291 server_pref_dict1->SetWithoutPathExpansion("alternative_service", | 291 server_pref_dict1->SetWithoutPathExpansion("alternative_service", |
292 alternative_service_list1); | 292 alternative_service_list1); |
293 | 293 |
294 // Set up ServerNetworkStats for https://mail.google.com and it is the MRU | 294 // Set up ServerNetworkStats for https://mail.google.com and it is the MRU |
295 // server. | 295 // server. |
296 base::DictionaryValue* stats1 = new base::DictionaryValue; | 296 base::DictionaryValue* stats1 = new base::DictionaryValue; |
297 stats1->SetInteger("srtt", 20); | 297 stats1->SetInteger("srtt", 20); |
298 server_pref_dict1->SetWithoutPathExpansion("network_stats", stats1); | 298 server_pref_dict1->SetWithoutPathExpansion("network_stats", stats1); |
299 // Set the server preference for https://mail.google.com. | 299 // Set the server preference for https://mail.google.com. |
300 servers_dict->SetWithoutPathExpansion( | 300 servers_dict->SetWithoutPathExpansion( |
301 GetParam() >= 5 ? "https://mail.google.com" : "mail.google.com:443", | 301 GetParam() >= 5 ? "https://mail.google.com" : "mail.google.com:443", |
302 server_pref_dict1); | 302 server_pref_dict1); |
303 base::DictionaryValue http_server_properties_dict; | 303 base::DictionaryValue http_server_properties_dict; |
304 if (GetParam() >= 4) { | 304 if (GetParam() >= 4) { |
305 // |servers_list| takes ownership of |servers_dict|. | 305 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
306 servers_list->AppendIfNotPresent(servers_dict); | |
307 if (GetParam() == 5) { | 306 if (GetParam() == 5) { |
308 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); | 307 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); |
309 } else { | 308 } else { |
310 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 309 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
311 GetParam()); | 310 GetParam()); |
312 } | 311 } |
313 http_server_properties_dict.SetWithoutPathExpansion("servers", | 312 http_server_properties_dict.SetWithoutPathExpansion("servers", |
314 servers_list); | 313 servers_list); |
315 } else { | 314 } else { |
316 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 315 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
317 GetParam()); | 316 GetParam()); |
318 http_server_properties_dict.SetWithoutPathExpansion("servers", | 317 http_server_properties_dict.SetWithoutPathExpansion( |
319 servers_dict); | 318 "servers", std::move(servers_dict)); |
320 } | 319 } |
321 base::DictionaryValue* supports_quic = new base::DictionaryValue; | 320 base::DictionaryValue* supports_quic = new base::DictionaryValue; |
322 supports_quic->SetBoolean("used_quic", true); | 321 supports_quic->SetBoolean("used_quic", true); |
323 supports_quic->SetString("address", "127.0.0.1"); | 322 supports_quic->SetString("address", "127.0.0.1"); |
324 http_server_properties_dict.SetWithoutPathExpansion("supports_quic", | 323 http_server_properties_dict.SetWithoutPathExpansion("supports_quic", |
325 supports_quic); | 324 supports_quic); |
326 | 325 |
327 // Set quic_server_info for https://www.google.com, https://mail.google.com | 326 // Set quic_server_info for https://www.google.com, https://mail.google.com |
328 // and https://play.google.com and verify the MRU. | 327 // and https://play.google.com and verify the MRU. |
329 http_server_props_manager_->SetMaxServerConfigsStoredInProperties(3); | 328 http_server_props_manager_->SetMaxServerConfigsStoredInProperties(3); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 alternative_service_list->Append(std::move(alternative_service_dict)); | 467 alternative_service_list->Append(std::move(alternative_service_dict)); |
469 server_pref_dict->SetWithoutPathExpansion("alternative_service", | 468 server_pref_dict->SetWithoutPathExpansion("alternative_service", |
470 alternative_service_list); | 469 alternative_service_list); |
471 | 470 |
472 // Set up ServerNetworkStats for www.google.com:65536. | 471 // Set up ServerNetworkStats for www.google.com:65536. |
473 base::DictionaryValue* stats = new base::DictionaryValue; | 472 base::DictionaryValue* stats = new base::DictionaryValue; |
474 stats->SetInteger("srtt", 10); | 473 stats->SetInteger("srtt", 10); |
475 server_pref_dict->SetWithoutPathExpansion("network_stats", stats); | 474 server_pref_dict->SetWithoutPathExpansion("network_stats", stats); |
476 | 475 |
477 // Set the server preference for www.google.com:65536. | 476 // Set the server preference for www.google.com:65536. |
478 base::DictionaryValue* servers_dict = new base::DictionaryValue; | 477 auto servers_dict = base::MakeUnique<base::DictionaryValue>(); |
479 servers_dict->SetWithoutPathExpansion("www.google.com:65536", | 478 servers_dict->SetWithoutPathExpansion("www.google.com:65536", |
480 server_pref_dict); | 479 server_pref_dict); |
481 base::DictionaryValue http_server_properties_dict; | 480 base::DictionaryValue http_server_properties_dict; |
482 if (GetParam() >= 4) { | 481 if (GetParam() >= 4) { |
483 base::ListValue* servers_list = new base::ListValue; | 482 base::ListValue* servers_list = new base::ListValue; |
484 // |servers_list| takes ownership of |servers_dict|. | 483 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
485 servers_list->AppendIfNotPresent(servers_dict); | |
486 if (GetParam() == 5) { | 484 if (GetParam() == 5) { |
487 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); | 485 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); |
488 } else { | 486 } else { |
489 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 487 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
490 GetParam()); | 488 GetParam()); |
491 } | 489 } |
492 http_server_properties_dict.SetWithoutPathExpansion("servers", | 490 http_server_properties_dict.SetWithoutPathExpansion("servers", |
493 servers_list); | 491 servers_list); |
494 } else { | 492 } else { |
495 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 493 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
496 GetParam()); | 494 GetParam()); |
497 http_server_properties_dict.SetWithoutPathExpansion("servers", | 495 http_server_properties_dict.SetWithoutPathExpansion( |
498 servers_dict); | 496 "servers", std::move(servers_dict)); |
499 } | 497 } |
500 | 498 |
501 // Set quic_server_info for www.google.com:65536. | 499 // Set quic_server_info for www.google.com:65536. |
502 base::DictionaryValue* quic_servers_dict = new base::DictionaryValue; | 500 base::DictionaryValue* quic_servers_dict = new base::DictionaryValue; |
503 base::DictionaryValue* quic_server_pref_dict1 = new base::DictionaryValue; | 501 base::DictionaryValue* quic_server_pref_dict1 = new base::DictionaryValue; |
504 quic_server_pref_dict1->SetStringWithoutPathExpansion("server_info", | 502 quic_server_pref_dict1->SetStringWithoutPathExpansion("server_info", |
505 "quic_server_info1"); | 503 "quic_server_info1"); |
506 quic_servers_dict->SetWithoutPathExpansion("http://mail.google.com:65536", | 504 quic_servers_dict->SetWithoutPathExpansion("http://mail.google.com:65536", |
507 quic_server_pref_dict1); | 505 quic_server_pref_dict1); |
508 | 506 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 std::unique_ptr<base::DictionaryValue> alternative_service_dict( | 543 std::unique_ptr<base::DictionaryValue> alternative_service_dict( |
546 new base::DictionaryValue); | 544 new base::DictionaryValue); |
547 alternative_service_dict->SetString("protocol_str", "npn-h2"); | 545 alternative_service_dict->SetString("protocol_str", "npn-h2"); |
548 alternative_service_dict->SetInteger("port", 65536); | 546 alternative_service_dict->SetInteger("port", 65536); |
549 base::ListValue* alternative_service_list = new base::ListValue; | 547 base::ListValue* alternative_service_list = new base::ListValue; |
550 alternative_service_list->Append(std::move(alternative_service_dict)); | 548 alternative_service_list->Append(std::move(alternative_service_dict)); |
551 server_pref_dict->SetWithoutPathExpansion("alternative_service", | 549 server_pref_dict->SetWithoutPathExpansion("alternative_service", |
552 alternative_service_list); | 550 alternative_service_list); |
553 | 551 |
554 // Set the server preference for www.google.com:80. | 552 // Set the server preference for www.google.com:80. |
555 base::DictionaryValue* servers_dict = new base::DictionaryValue; | 553 auto servers_dict = base::MakeUnique<base::DictionaryValue>(); |
556 servers_dict->SetWithoutPathExpansion("www.google.com:80", server_pref_dict); | 554 servers_dict->SetWithoutPathExpansion("www.google.com:80", server_pref_dict); |
557 base::DictionaryValue http_server_properties_dict; | 555 base::DictionaryValue http_server_properties_dict; |
558 if (GetParam() >= 4) { | 556 if (GetParam() >= 4) { |
559 base::ListValue* servers_list = new base::ListValue; | 557 base::ListValue* servers_list = new base::ListValue; |
560 // |servers_list| takes ownership of |servers_dict|. | 558 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
561 servers_list->AppendIfNotPresent(servers_dict); | |
562 if (GetParam() == 5) { | 559 if (GetParam() == 5) { |
563 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); | 560 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); |
564 } else { | 561 } else { |
565 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 562 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
566 GetParam()); | 563 GetParam()); |
567 } | 564 } |
568 http_server_properties_dict.SetWithoutPathExpansion("servers", | 565 http_server_properties_dict.SetWithoutPathExpansion("servers", |
569 servers_list); | 566 servers_list); |
570 } else { | 567 } else { |
571 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 568 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
572 GetParam()); | 569 GetParam()); |
573 http_server_properties_dict.SetWithoutPathExpansion("servers", | 570 http_server_properties_dict.SetWithoutPathExpansion( |
574 servers_dict); | 571 "servers", std::move(servers_dict)); |
575 } | 572 } |
576 | 573 |
577 // Set up the pref. | 574 // Set up the pref. |
578 pref_delegate_->SetPrefs(http_server_properties_dict); | 575 pref_delegate_->SetPrefs(http_server_properties_dict); |
579 | 576 |
580 base::RunLoop().RunUntilIdle(); | 577 base::RunLoop().RunUntilIdle(); |
581 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); | 578 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
582 | 579 |
583 // Verify alternative service is not set. | 580 // Verify alternative service is not set. |
584 EXPECT_FALSE( | 581 EXPECT_FALSE( |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 EXPECT_EQ(0U, settings_map2_ret.size()); | 962 EXPECT_EQ(0U, settings_map2_ret.size()); |
966 | 963 |
967 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); | 964 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
968 } | 965 } |
969 | 966 |
970 // https://crbug.com/444956: Add 200 alternative_service servers followed by | 967 // https://crbug.com/444956: Add 200 alternative_service servers followed by |
971 // supports_quic and verify we have read supports_quic from prefs. | 968 // supports_quic and verify we have read supports_quic from prefs. |
972 TEST_P(HttpServerPropertiesManagerTest, BadSupportsQuic) { | 969 TEST_P(HttpServerPropertiesManagerTest, BadSupportsQuic) { |
973 ExpectCacheUpdate(); | 970 ExpectCacheUpdate(); |
974 | 971 |
975 base::DictionaryValue* servers_dict = new base::DictionaryValue; | 972 auto servers_dict = base::MakeUnique<base::DictionaryValue>(); |
976 base::ListValue* servers_list = nullptr; | 973 base::ListValue* servers_list = nullptr; |
977 if (GetParam() >= 4) | 974 if (GetParam() >= 4) |
978 servers_list = new base::ListValue; | 975 servers_list = new base::ListValue; |
979 | 976 |
980 for (int i = 1; i <= 200; ++i) { | 977 for (int i = 1; i <= 200; ++i) { |
981 // Set up alternative_service for www.google.com:i. | 978 // Set up alternative_service for www.google.com:i. |
982 std::unique_ptr<base::DictionaryValue> alternative_service_dict( | 979 std::unique_ptr<base::DictionaryValue> alternative_service_dict( |
983 new base::DictionaryValue); | 980 new base::DictionaryValue); |
984 alternative_service_dict->SetString("protocol_str", "quic"); | 981 alternative_service_dict->SetString("protocol_str", "quic"); |
985 alternative_service_dict->SetInteger("port", i); | 982 alternative_service_dict->SetInteger("port", i); |
986 base::ListValue* alternative_service_list = new base::ListValue; | 983 base::ListValue* alternative_service_list = new base::ListValue; |
987 alternative_service_list->Append(std::move(alternative_service_dict)); | 984 alternative_service_list->Append(std::move(alternative_service_dict)); |
988 base::DictionaryValue* server_pref_dict = new base::DictionaryValue; | 985 base::DictionaryValue* server_pref_dict = new base::DictionaryValue; |
989 server_pref_dict->SetWithoutPathExpansion("alternative_service", | 986 server_pref_dict->SetWithoutPathExpansion("alternative_service", |
990 alternative_service_list); | 987 alternative_service_list); |
991 if (GetParam() >= 5) { | 988 if (GetParam() >= 5) { |
992 servers_dict->SetWithoutPathExpansion( | 989 servers_dict->SetWithoutPathExpansion( |
993 StringPrintf("https://www.google.com:%d", i), server_pref_dict); | 990 StringPrintf("https://www.google.com:%d", i), server_pref_dict); |
994 } else { | 991 } else { |
995 servers_dict->SetWithoutPathExpansion( | 992 servers_dict->SetWithoutPathExpansion( |
996 StringPrintf("www.google.com:%d", i), server_pref_dict); | 993 StringPrintf("www.google.com:%d", i), server_pref_dict); |
997 } | 994 } |
998 if (GetParam() >= 4) { | 995 if (GetParam() >= 4) { |
999 // |servers_list| takes ownership of |servers_dict|. | 996 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
1000 servers_list->AppendIfNotPresent(servers_dict); | 997 servers_dict = base::MakeUnique<base::DictionaryValue>(); |
1001 servers_dict = new base::DictionaryValue; | |
1002 } | 998 } |
1003 } | 999 } |
1004 | 1000 |
1005 // Set the server preference for http://mail.google.com server. | 1001 // Set the server preference for http://mail.google.com server. |
1006 base::DictionaryValue* server_pref_dict1 = new base::DictionaryValue; | 1002 base::DictionaryValue* server_pref_dict1 = new base::DictionaryValue; |
1007 if (GetParam() >= 5) { | 1003 if (GetParam() >= 5) { |
1008 servers_dict->SetWithoutPathExpansion("https://mail.google.com", | 1004 servers_dict->SetWithoutPathExpansion("https://mail.google.com", |
1009 server_pref_dict1); | 1005 server_pref_dict1); |
1010 } else { | 1006 } else { |
1011 servers_dict->SetWithoutPathExpansion("mail.google.com:80", | 1007 servers_dict->SetWithoutPathExpansion("mail.google.com:80", |
1012 server_pref_dict1); | 1008 server_pref_dict1); |
1013 } | 1009 } |
1014 base::DictionaryValue http_server_properties_dict; | 1010 base::DictionaryValue http_server_properties_dict; |
1015 if (GetParam() >= 4) { | 1011 if (GetParam() >= 4) { |
1016 // |servers_list| takes ownership of |servers_dict|. | 1012 servers_list->AppendIfNotPresent(std::move(servers_dict)); |
1017 servers_list->AppendIfNotPresent(servers_dict); | |
1018 if (GetParam() == 5) { | 1013 if (GetParam() == 5) { |
1019 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); | 1014 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1); |
1020 } else { | 1015 } else { |
1021 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 1016 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
1022 GetParam()); | 1017 GetParam()); |
1023 } | 1018 } |
1024 http_server_properties_dict.SetWithoutPathExpansion("servers", | 1019 http_server_properties_dict.SetWithoutPathExpansion("servers", |
1025 servers_list); | 1020 servers_list); |
1026 } else { | 1021 } else { |
1027 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, | 1022 HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, |
1028 GetParam()); | 1023 GetParam()); |
1029 http_server_properties_dict.SetWithoutPathExpansion("servers", | 1024 http_server_properties_dict.SetWithoutPathExpansion( |
1030 servers_dict); | 1025 "servers", std::move(servers_dict)); |
1031 } | 1026 } |
1032 | 1027 |
1033 // Set up SupportsQuic for 127.0.0.1 | 1028 // Set up SupportsQuic for 127.0.0.1 |
1034 base::DictionaryValue* supports_quic = new base::DictionaryValue; | 1029 base::DictionaryValue* supports_quic = new base::DictionaryValue; |
1035 supports_quic->SetBoolean("used_quic", true); | 1030 supports_quic->SetBoolean("used_quic", true); |
1036 supports_quic->SetString("address", "127.0.0.1"); | 1031 supports_quic->SetString("address", "127.0.0.1"); |
1037 http_server_properties_dict.SetWithoutPathExpansion("supports_quic", | 1032 http_server_properties_dict.SetWithoutPathExpansion("supports_quic", |
1038 supports_quic); | 1033 supports_quic); |
1039 | 1034 |
1040 // Set up the pref. | 1035 // Set up the pref. |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 // Shutdown comes before the task is executed. | 1378 // Shutdown comes before the task is executed. |
1384 http_server_props_manager_->ShutdownOnPrefThread(); | 1379 http_server_props_manager_->ShutdownOnPrefThread(); |
1385 // Run the task after shutdown, but before deletion. | 1380 // Run the task after shutdown, but before deletion. |
1386 base::RunLoop().RunUntilIdle(); | 1381 base::RunLoop().RunUntilIdle(); |
1387 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); | 1382 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
1388 http_server_props_manager_.reset(); | 1383 http_server_props_manager_.reset(); |
1389 base::RunLoop().RunUntilIdle(); | 1384 base::RunLoop().RunUntilIdle(); |
1390 } | 1385 } |
1391 | 1386 |
1392 } // namespace net | 1387 } // namespace net |
OLD | NEW |