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