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

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

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 EXPECT_EQ(1U, net_test_task_runner_->GetPendingTaskCount()); 1391 EXPECT_EQ(1U, net_test_task_runner_->GetPendingTaskCount());
1392 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1392 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1393 1393
1394 const base::DictionaryValue& pref_dict = 1394 const base::DictionaryValue& pref_dict =
1395 pref_delegate_->GetServerProperties(); 1395 pref_delegate_->GetServerProperties();
1396 1396
1397 const base::ListValue* servers_list = nullptr; 1397 const base::ListValue* servers_list = nullptr;
1398 ASSERT_TRUE(pref_dict.GetListWithoutPathExpansion("servers", &servers_list)); 1398 ASSERT_TRUE(pref_dict.GetListWithoutPathExpansion("servers", &servers_list));
1399 base::ListValue::const_iterator it = servers_list->begin(); 1399 base::ListValue::const_iterator it = servers_list->begin();
1400 const base::DictionaryValue* server_pref_dict; 1400 const base::DictionaryValue* server_pref_dict;
1401 ASSERT_TRUE(it->GetAsDictionary(&server_pref_dict)); 1401 ASSERT_TRUE((*it)->GetAsDictionary(&server_pref_dict));
1402 1402
1403 const base::DictionaryValue* example_pref_dict; 1403 const base::DictionaryValue* example_pref_dict;
1404 1404
1405 ASSERT_TRUE(server_pref_dict->GetDictionaryWithoutPathExpansion( 1405 ASSERT_TRUE(server_pref_dict->GetDictionaryWithoutPathExpansion(
1406 "https://www.example.com", &example_pref_dict)); 1406 "https://www.example.com", &example_pref_dict));
1407 1407
1408 const base::ListValue* altsvc_list; 1408 const base::ListValue* altsvc_list;
1409 ASSERT_TRUE(example_pref_dict->GetList("alternative_service", &altsvc_list)); 1409 ASSERT_TRUE(example_pref_dict->GetList("alternative_service", &altsvc_list));
1410 1410
1411 ASSERT_EQ(1u, altsvc_list->GetSize()); 1411 ASSERT_EQ(1u, altsvc_list->GetSize());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 pref_test_task_runner_->FastForwardUntilNoTasksRemain(); 1558 pref_test_task_runner_->FastForwardUntilNoTasksRemain();
1559 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1559 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1560 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1560 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1561 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 1561 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
1562 http_server_props_manager_.reset(); 1562 http_server_props_manager_.reset();
1563 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1563 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1564 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1564 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1565 } 1565 }
1566 1566
1567 } // namespace net 1567 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | net/test/spawned_test_server/local_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698