diff options
author | cernekee <cernekee@chromium.org> | 2016-03-15 16:33:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-15 23:35:10 +0000 |
commit | f1da84b10359d62c67a73e46da90b0d0510a0768 (patch) | |
tree | 26e92834631e010954b80a4cada4a6b6efd4f8bd /chromeos/network/network_configuration_handler_unittest.cc | |
parent | a3a50c140c60eb242df3dd4df06fe55cad117c75 (diff) | |
download | chromium_src-f1da84b10359d62c67a73e46da90b0d0510a0768.zip chromium_src-f1da84b10359d62c67a73e46da90b0d0510a0768.tar.gz chromium_src-f1da84b10359d62c67a73e46da90b0d0510a0768.tar.bz2 |
Invoke createNetwork() callback with GUID, not service name
The current implementation doesn't match the API spec. Fix this.
BUG=593196
TEST=go to chrome://settings/network , ctrl-shift-i, run in console:
chrome.networkingPrivate.createNetwork(false,
{"Type":"WiFi","WiFi":{"SSID":"GoogleGuest","AutoConnect":true}},
function(x) { console.log(x); })
Review URL: https://codereview.chromium.org/1779633002
Cr-Commit-Position: refs/heads/master@{#381347}
Diffstat (limited to 'chromeos/network/network_configuration_handler_unittest.cc')
-rw-r--r-- | chromeos/network/network_configuration_handler_unittest.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc index a5be195..cc8b3ee 100644 --- a/chromeos/network/network_configuration_handler_unittest.cc +++ b/chromeos/network/network_configuration_handler_unittest.cc @@ -73,9 +73,10 @@ void ErrorCallback(bool error_expected, << PrettyJson(*error_data); } -void StringResultCallback(const std::string& expected_result, - const std::string& result) { - EXPECT_EQ(expected_result, result); +void ServiceResultCallback(const std::string& expected_result, + const std::string& service_path, + const std::string& guid) { + EXPECT_EQ(expected_result, service_path); } void DBusErrorCallback(const std::string& error_name, @@ -286,7 +287,7 @@ class NetworkConfigurationHandlerTest : public testing::Test { const base::DictionaryValue& properties) { network_configuration_handler_->CreateShillConfiguration( properties, NetworkConfigurationObserver::SOURCE_USER_ACTION, - base::Bind(&StringResultCallback, service_path), + base::Bind(&ServiceResultCallback, service_path), base::Bind(&ErrorCallback, false, std::string())); } @@ -525,7 +526,8 @@ class NetworkConfigurationHandlerStubTest : public testing::Test { get_properties_.reset(dictionary.DeepCopy()); } - void CreateConfigurationCallback(const std::string& service_path) { + void CreateConfigurationCallback(const std::string& service_path, + const std::string& guid) { create_service_path_ = service_path; } |