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

Unified Diff: components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc

Issue 1426393003: NOT FOR REVIEW Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.5-split-wcss
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/wifi_sync/wifi_config_delegate_chromeos.cc ('k') | components/wifi_sync/wifi_config_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc
diff --git a/components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc b/components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc
index e00a99d48d6c4a00a39ee960bf8262ffda574996..90c4746cbad8049c4b3aa53342a8b8586517c3ea 100644
--- a/components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc
+++ b/components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc
@@ -12,17 +12,17 @@
#include "components/wifi_sync/wifi_credential.h"
#include "testing/gtest/include/gtest/gtest.h"
+using chromeos::network_handler::DictionaryResultCallback;
+using chromeos::network_handler::ErrorCallback;
+using chromeos::network_handler::StringResultCallback;
+
namespace wifi_sync {
namespace {
+
const char kSsid[] = "fake-ssid";
const char kSsidNonUtf8[] = "\xc0";
const char kUserHash[] = "fake-user-hash";
-}
-
-using chromeos::network_handler::DictionaryResultCallback;
-using chromeos::network_handler::ErrorCallback;
-using chromeos::network_handler::StringResultCallback;
class FakeManagedNetworkConfigurationHandler
: public chromeos::ManagedNetworkConfigurationHandler {
@@ -128,15 +128,15 @@ class FakeManagedNetworkConfigurationHandler
mutable ErrorCallback create_configuration_error_callback_;
};
+} // namespace
+
class WifiConfigDelegateChromeOsTest : public testing::Test {
protected:
- WifiConfigDelegateChromeOsTest()
- : fake_managed_network_configuration_handler_(
- new FakeManagedNetworkConfigurationHandler()) {
+ WifiConfigDelegateChromeOsTest() {
config_delegate_.reset(
new WifiConfigDelegateChromeOs(
kUserHash,
- fake_managed_network_configuration_handler_.get()));
+ &fake_managed_network_configuration_handler_));
}
// Wrapper for WifiConfigDelegateChromeOs::AddToLocalNetworks.
@@ -163,29 +163,29 @@ class WifiConfigDelegateChromeOsTest : public testing::Test {
const char new_service_path[] = "/service/0";
const StringResultCallback callback =
fake_managed_network_configuration_handler_
- ->create_configuration_success_callback();
+ .create_configuration_success_callback();
if (!callback.is_null())
callback.Run(new_service_path);
}
// Returns whether or not CreateConfiguration has been called
// on |fake_managed_network_configuration_handler_|.
- size_t create_configuration_called() const {
+ bool create_configuration_called() const {
return fake_managed_network_configuration_handler_
- ->create_configuration_called();
+ .create_configuration_called();
}
// Returns the last |error_callback| passed to the CreateConfiguration
// method of |fake_managed_network_configuration_handler_|.
const ErrorCallback& create_configuration_error_callback() const {
return fake_managed_network_configuration_handler_
- ->create_configuration_error_callback();
+ .create_configuration_error_callback();
}
private:
- scoped_ptr<WifiConfigDelegateChromeOs> config_delegate_;
- scoped_ptr<FakeManagedNetworkConfigurationHandler>
+ FakeManagedNetworkConfigurationHandler
fake_managed_network_configuration_handler_;
+ scoped_ptr<WifiConfigDelegateChromeOs> config_delegate_;
DISALLOW_COPY_AND_ASSIGN(WifiConfigDelegateChromeOsTest);
};
« no previous file with comments | « components/wifi_sync/wifi_config_delegate_chromeos.cc ('k') | components/wifi_sync/wifi_config_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698