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