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

Side by Side Diff: chromeos/network/prohibited_technologies_handler_unittest.cc

Issue 2689223002: Defer NetworkConfigurationHandler::CreateShillConfiguration callback (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « chromeos/network/network_state_handler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromeos/network/prohibited_technologies_handler.h" 5 #include "chromeos/network/prohibited_technologies_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 val->AppendString("WiFi"); 80 val->AppendString("WiFi");
81 global_config_disable_wifi.Set("DisableNetworkTypes", std::move(val)); 81 global_config_disable_wifi.Set("DisableNetworkTypes", std::move(val));
82 val.reset(new base::ListValue()); 82 val.reset(new base::ListValue());
83 val->AppendString("WiFi"); 83 val->AppendString("WiFi");
84 val->AppendString("Cellular"); 84 val->AppendString("Cellular");
85 global_config_disable_wifi_and_cell.Set("DisableNetworkTypes", 85 global_config_disable_wifi_and_cell.Set("DisableNetworkTypes",
86 std::move(val)); 86 std::move(val));
87 } 87 }
88 88
89 void TearDown() override { 89 void TearDown() override {
90 network_state_handler_->Shutdown();
90 prohibited_technologies_handler_.reset(); 91 prohibited_technologies_handler_.reset();
91 managed_config_handler_.reset(); 92 managed_config_handler_.reset();
92 network_profile_handler_.reset(); 93 network_profile_handler_.reset();
93 network_config_handler_.reset(); 94 network_config_handler_.reset();
94 network_state_handler_.reset(); 95 network_state_handler_.reset();
95 LoginState::Shutdown(); 96 LoginState::Shutdown();
96 DBusThreadManager::Shutdown(); 97 DBusThreadManager::Shutdown();
97 } 98 }
98 99
99 protected: 100 protected:
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 network_state_handler_->SetTechnologyEnabled( 187 network_state_handler_->SetTechnologyEnabled(
187 NetworkTypePattern::Cellular(), true, network_handler::ErrorCallback()); 188 NetworkTypePattern::Cellular(), true, network_handler::ErrorCallback());
188 base::RunLoop().RunUntilIdle(); 189 base::RunLoop().RunUntilIdle();
189 EXPECT_FALSE( 190 EXPECT_FALSE(
190 network_state_handler_->IsTechnologyEnabled(NetworkTypePattern::WiFi())); 191 network_state_handler_->IsTechnologyEnabled(NetworkTypePattern::WiFi()));
191 EXPECT_TRUE(network_state_handler_->IsTechnologyEnabled( 192 EXPECT_TRUE(network_state_handler_->IsTechnologyEnabled(
192 NetworkTypePattern::Cellular())); 193 NetworkTypePattern::Cellular()));
193 } 194 }
194 195
195 } // namespace chromeos 196 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698