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

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

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 EXPECT_EQ(1U, net_test_task_runner_->GetPendingTaskCount()); 1373 EXPECT_EQ(1U, net_test_task_runner_->GetPendingTaskCount());
1374 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1374 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1375 1375
1376 const base::DictionaryValue& pref_dict = 1376 const base::DictionaryValue& pref_dict =
1377 pref_delegate_->GetServerProperties(); 1377 pref_delegate_->GetServerProperties();
1378 1378
1379 const base::ListValue* servers_list = nullptr; 1379 const base::ListValue* servers_list = nullptr;
1380 ASSERT_TRUE(pref_dict.GetListWithoutPathExpansion("servers", &servers_list)); 1380 ASSERT_TRUE(pref_dict.GetListWithoutPathExpansion("servers", &servers_list));
1381 base::ListValue::const_iterator it = servers_list->begin(); 1381 base::ListValue::const_iterator it = servers_list->begin();
1382 const base::DictionaryValue* server_pref_dict; 1382 const base::DictionaryValue* server_pref_dict;
1383 ASSERT_TRUE((*it)->GetAsDictionary(&server_pref_dict)); 1383 ASSERT_TRUE(it->GetAsDictionary(&server_pref_dict));
1384 1384
1385 const base::DictionaryValue* example_pref_dict; 1385 const base::DictionaryValue* example_pref_dict;
1386 1386
1387 ASSERT_TRUE(server_pref_dict->GetDictionaryWithoutPathExpansion( 1387 ASSERT_TRUE(server_pref_dict->GetDictionaryWithoutPathExpansion(
1388 "https://www.example.com", &example_pref_dict)); 1388 "https://www.example.com", &example_pref_dict));
1389 1389
1390 const base::ListValue* altsvc_list; 1390 const base::ListValue* altsvc_list;
1391 ASSERT_TRUE(example_pref_dict->GetList("alternative_service", &altsvc_list)); 1391 ASSERT_TRUE(example_pref_dict->GetList("alternative_service", &altsvc_list));
1392 1392
1393 ASSERT_EQ(1u, altsvc_list->GetSize()); 1393 ASSERT_EQ(1u, altsvc_list->GetSize());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 pref_test_task_runner_->FastForwardUntilNoTasksRemain(); 1540 pref_test_task_runner_->FastForwardUntilNoTasksRemain();
1541 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1541 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1542 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1542 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1543 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 1543 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
1544 http_server_props_manager_.reset(); 1544 http_server_props_manager_.reset();
1545 EXPECT_FALSE(net_test_task_runner_->HasPendingTask()); 1545 EXPECT_FALSE(net_test_task_runner_->HasPendingTask());
1546 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask()); 1546 EXPECT_FALSE(pref_test_task_runner_->HasPendingTask());
1547 } 1547 }
1548 1548
1549 } // namespace net 1549 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698