OLD | NEW |
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 <memory> | 5 #include <memory> |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
8 #include "chrome/browser/chromeos/net/network_throttling_observer.h" | 9 #include "chrome/browser/chromeos/net/network_throttling_observer.h" |
9 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
11 #include "chromeos/dbus/mock_shill_manager_client.h" | 12 #include "chromeos/dbus/mock_shill_manager_client.h" |
12 #include "chromeos/network/network_state_handler.h" | 13 #include "chromeos/network/network_state_handler.h" |
13 #include "components/prefs/pref_registry_simple.h" | 14 #include "components/prefs/pref_registry_simple.h" |
14 #include "components/prefs/testing_pref_service.h" | 15 #include "components/prefs/testing_pref_service.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 79 |
79 // Clearing the preference should disable throttling | 80 // Clearing the preference should disable throttling |
80 EXPECT_CALL(*mock_manager_client_, | 81 EXPECT_CALL(*mock_manager_client_, |
81 SetNetworkThrottlingStatus(false, 0, 0, _, _)) | 82 SetNetworkThrottlingStatus(false, 0, 0, _, _)) |
82 .Times(1); | 83 .Times(1); |
83 local_state_->ClearPref(prefs::kNetworkThrottlingEnabled); | 84 local_state_->ClearPref(prefs::kNetworkThrottlingEnabled); |
84 } | 85 } |
85 | 86 |
86 } // namespace test | 87 } // namespace test |
87 } // namespace chromeos | 88 } // namespace chromeos |
OLD | NEW |