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

Side by Side Diff: chromeos/network/network_state_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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 network_state_handler_.reset(new NetworkStateHandler); 186 network_state_handler_.reset(new NetworkStateHandler);
187 test_observer_.reset(new TestObserver(network_state_handler_.get())); 187 test_observer_.reset(new TestObserver(network_state_handler_.get()));
188 network_state_handler_->AddObserver(test_observer_.get(), FROM_HERE); 188 network_state_handler_->AddObserver(test_observer_.get(), FROM_HERE);
189 network_state_handler_->InitShillPropertyHandler(); 189 network_state_handler_->InitShillPropertyHandler();
190 base::RunLoop().RunUntilIdle(); 190 base::RunLoop().RunUntilIdle();
191 test_observer_->reset_change_counts(); 191 test_observer_->reset_change_counts();
192 } 192 }
193 193
194 void TearDown() override { 194 void TearDown() override {
195 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE); 195 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE);
196 network_state_handler_->Shutdown();
196 test_observer_.reset(); 197 test_observer_.reset();
197 network_state_handler_.reset(); 198 network_state_handler_.reset();
198 DBusThreadManager::Shutdown(); 199 DBusThreadManager::Shutdown();
199 } 200 }
200 201
201 protected: 202 protected:
202 void AddService(const std::string& service_path, 203 void AddService(const std::string& service_path,
203 const std::string& guid, 204 const std::string& guid,
204 const std::string& name, 205 const std::string& name,
205 const std::string& type, 206 const std::string& type,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty, 796 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty,
796 base::StringValue(kIPConfigPath)); 797 base::StringValue(kIPConfigPath));
797 UpdateManagerProperties(); 798 UpdateManagerProperties();
798 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice( 799 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice(
799 kShillManagerClientStubWifiDevice)); 800 kShillManagerClientStubWifiDevice));
800 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService( 801 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService(
801 kShillManagerClientStubDefaultWifi)); 802 kShillManagerClientStubDefaultWifi));
802 } 803 }
803 804
804 } // namespace chromeos 805 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_device_handler_unittest.cc ('k') | chromeos/network/prohibited_technologies_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698