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

Unified Diff: chromeos/dbus/shill_manager_client_unittest.cc

Issue 2463023002: Revert of Add network throttling as an enterprise policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted by hand Created 4 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 | « chromeos/dbus/shill_manager_client.cc ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_manager_client_unittest.cc
diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc
index 8546466880b039dccd8e30855841c50ca6a04d6b..83f1412d1ad4d185a963158b28308d7cb5e74f00 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -52,21 +52,6 @@ void ExpectStringArgumentsFollowedByObjectPath(
EXPECT_FALSE(reader->HasMoreData());
}
-void ExpectThrottlingArguments(bool throttling_enabled_expected,
- uint32_t upload_rate_kbits_expected,
- uint32_t download_rate_kbits_expected,
- dbus::MessageReader* reader) {
- bool throttling_enabled_actual;
- uint32_t upload_rate_kbits_actual;
- uint32_t download_rate_kbits_actual;
- ASSERT_TRUE(reader->PopBool(&throttling_enabled_actual));
- EXPECT_EQ(throttling_enabled_actual, throttling_enabled_expected);
- ASSERT_TRUE(reader->PopUint32(&upload_rate_kbits_actual));
- EXPECT_EQ(upload_rate_kbits_expected, upload_rate_kbits_actual);
- ASSERT_TRUE(reader->PopUint32(&download_rate_kbits_actual));
- EXPECT_EQ(download_rate_kbits_expected, download_rate_kbits_actual);
- EXPECT_FALSE(reader->HasMoreData());
-}
} // namespace
@@ -264,30 +249,6 @@ TEST_F(ShillManagerClientTest, EnableTechnology) {
base::RunLoop().RunUntilIdle();
}
-TEST_F(ShillManagerClientTest, NetworkThrottling) {
- // Create response.
- std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
- // Set expectations.
- const bool enabled = true;
- const uint32_t upload_rate = 1200;
- const uint32_t download_rate = 2000;
- PrepareForMethodCall(shill::kSetNetworkThrottlingFunction,
- base::Bind(&ExpectThrottlingArguments, enabled,
- upload_rate, download_rate),
- response.get());
- // Call method.
- MockClosure mock_closure;
- MockErrorCallback mock_error_callback;
- client_->SetNetworkThrottlingStatus(enabled, upload_rate, download_rate,
- mock_closure.GetCallback(),
- mock_error_callback.GetCallback());
- EXPECT_CALL(mock_closure, Run()).Times(1);
- EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
-
- // Run the message loop.
- base::RunLoop().RunUntilIdle();
-}
-
TEST_F(ShillManagerClientTest, DisableTechnology) {
// Create response.
std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
« no previous file with comments | « chromeos/dbus/shill_manager_client.cc ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698