| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/macros.h" |
| 5 #include "base/prefs/testing_pref_service.h" | 6 #include "base/prefs/testing_pref_service.h" |
| 6 #include "components/web_resource/eula_accepted_notifier.h" | 7 #include "components/web_resource/eula_accepted_notifier.h" |
| 7 #include "components/web_resource/resource_request_allowed_notifier_test_util.h" | 8 #include "components/web_resource/resource_request_allowed_notifier_test_util.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 10 |
| 10 namespace web_resource { | 11 namespace web_resource { |
| 11 | 12 |
| 12 // Override NetworkChangeNotifier to simulate connection type changes for tests. | 13 // Override NetworkChangeNotifier to simulate connection type changes for tests. |
| 13 class TestNetworkChangeNotifier : public net::NetworkChangeNotifier { | 14 class TestNetworkChangeNotifier : public net::NetworkChangeNotifier { |
| 14 public: | 15 public: |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 DisableEulaAndNetwork(); | 271 DisableEulaAndNetwork(); |
| 271 | 272 |
| 272 SimulateNetworkConnectionChange(net::NetworkChangeNotifier::CONNECTION_WIFI); | 273 SimulateNetworkConnectionChange(net::NetworkChangeNotifier::CONNECTION_WIFI); |
| 273 EXPECT_FALSE(was_notified()); | 274 EXPECT_FALSE(was_notified()); |
| 274 | 275 |
| 275 SimulateEulaAccepted(); | 276 SimulateEulaAccepted(); |
| 276 EXPECT_FALSE(was_notified()); | 277 EXPECT_FALSE(was_notified()); |
| 277 } | 278 } |
| 278 | 279 |
| 279 } // namespace web_resource | 280 } // namespace web_resource |
| OLD | NEW |