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

Unified Diff: chrome/browser/chromeos/cros/cros_network_functions_unittest.cc

Issue 10177001: Reimplement CrosSetOfflineMode without Libcros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
diff --git a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
index 2671e6b7cb49c2c1e7df9d24f5e62eb6ac0021c3..85355533069b52b386c058142a67bc85e57ea877 100644
--- a/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
+++ b/chrome/browser/chromeos/cros/cros_network_functions_unittest.cc
@@ -685,6 +685,12 @@ TEST_F(CrosNetworkFunctionsLibcrosTest, CrosRequestCellularRegister) {
object);
}
+TEST_F(CrosNetworkFunctionsLibcrosTest, CrosSetOfflineMode) {
+ const bool kOffline = true;
+ EXPECT_CALL(*MockChromeOSNetwork::Get(), SetOfflineMode(kOffline)).Times(1);
+ CrosSetOfflineMode(kOffline);
+}
+
TEST_F(CrosNetworkFunctionsLibcrosTest, CrosAddIPConfig) {
const std::string device_path = "/device/path";
EXPECT_CALL(*MockChromeOSNetwork::Get(),
@@ -1312,6 +1318,14 @@ TEST_F(CrosNetworkFunctionsTest, CrosRequestCellularRegister) {
callback.Run();
}
+TEST_F(CrosNetworkFunctionsTest, CrosSetOfflineMode) {
+ const bool kOffline = true;
+ const base::FundamentalValue value(kOffline);
+ EXPECT_CALL(*mock_manager_client_, SetProperty(
+ flimflam::kOfflineModeProperty, IsEqualTo(&value), _)).Times(1);
+ CrosSetOfflineMode(kOffline);
+}
+
TEST_F(CrosNetworkFunctionsTest, CrosAddIPConfig) {
const std::string device_path = "/device/path";
const dbus::ObjectPath result_path("/result/path");
« no previous file with comments | « chrome/browser/chromeos/cros/cros_network_functions.cc ('k') | chrome/browser/chromeos/cros/mock_chromeos_network.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698