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

Side by Side Diff: chromeos/components/tether/network_connection_handler_tether_delegate_unittest.cc

Issue 2949343002: Tether: record each type of host connection result. (Closed)
Patch Set: Fix crash. Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/components/tether/network_connection_handler_tether_delegate. h" 5 #include "chromeos/components/tether/network_connection_handler_tether_delegate. h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "chromeos/components/tether/tether_connector.h" 9 #include "chromeos/components/tether/tether_connector.h"
10 #include "chromeos/components/tether/tether_disconnector.h" 10 #include "chromeos/components/tether/tether_disconnector.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 public: 68 public:
69 MockTetherConnector() 69 MockTetherConnector()
70 : TetherConnector(nullptr /* network_state_handler */, 70 : TetherConnector(nullptr /* network_state_handler */,
71 nullptr /* wifi_hotspot_connector */, 71 nullptr /* wifi_hotspot_connector */,
72 nullptr /* active_host */, 72 nullptr /* active_host */,
73 nullptr /* tether_host_fetcher */, 73 nullptr /* tether_host_fetcher */,
74 nullptr /* connection_manager */, 74 nullptr /* connection_manager */,
75 nullptr /* tether_host_response_recorder */, 75 nullptr /* tether_host_response_recorder */,
76 nullptr /* device_id_tether_network_guid_map */, 76 nullptr /* device_id_tether_network_guid_map */,
77 nullptr /* host_scan_cache */, 77 nullptr /* host_scan_cache */,
78 nullptr /* notification_presenter */) {} 78 nullptr /* notification_presenter */,
79 nullptr /* host_connection_metrics_logger */) {}
79 ~MockTetherConnector() override {} 80 ~MockTetherConnector() override {}
80 81
81 MOCK_METHOD3( 82 MOCK_METHOD3(
82 ConnectToNetwork, 83 ConnectToNetwork,
83 void(const std::string& tether_network_guid, 84 void(const std::string& tether_network_guid,
84 const base::Closure& success_callback, 85 const base::Closure& success_callback,
85 const network_handler::StringResultCallback& error_callback)); 86 const network_handler::StringResultCallback& error_callback));
86 }; 87 };
87 88
88 class MockTetherDisconnector : public TetherDisconnector { 89 class MockTetherDisconnector : public TetherDisconnector {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) { 138 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) {
138 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _)); 139 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _));
139 140
140 test_network_connection_handler_->CallTetherDisconnect( 141 test_network_connection_handler_->CallTetherDisconnect(
141 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback()); 142 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback());
142 } 143 }
143 144
144 } // namespace tether 145 } // namespace tether
145 146
146 } // namespace chromeos 147 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/mock_host_connection_metrics_logger.cc ('k') | chromeos/components/tether/tether_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698