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/prefs/testing_pref_service.h" | 5 #include "base/prefs/testing_pref_service.h" |
| 6 #include "chrome/browser/chrome_notification_types.h" |
6 #include "chrome/browser/web_resource/eula_accepted_notifier.h" | 7 #include "chrome/browser/web_resource/eula_accepted_notifier.h" |
7 #include "chrome/browser/web_resource/resource_request_allowed_notifier_test_uti
l.h" | 8 #include "chrome/browser/web_resource/resource_request_allowed_notifier_test_uti
l.h" |
8 #include "chrome/common/chrome_notification_types.h" | |
9 #include "chrome/test/base/testing_browser_process.h" | 9 #include "chrome/test/base/testing_browser_process.h" |
10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
11 #include "content/public/test/test_browser_thread.h" | 11 #include "content/public/test/test_browser_thread.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 // Override NetworkChangeNotifier to simulate connection type changes for tests. | 14 // Override NetworkChangeNotifier to simulate connection type changes for tests. |
15 class TestNetworkChangeNotifier : public net::NetworkChangeNotifier { | 15 class TestNetworkChangeNotifier : public net::NetworkChangeNotifier { |
16 public: | 16 public: |
17 TestNetworkChangeNotifier() | 17 TestNetworkChangeNotifier() |
18 : net::NetworkChangeNotifier(), | 18 : net::NetworkChangeNotifier(), |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // calling SimulateResourceRequest here. | 289 // calling SimulateResourceRequest here. |
290 DisableEulaAndNetwork(); | 290 DisableEulaAndNetwork(); |
291 | 291 |
292 SimulateNetworkConnectionChange( | 292 SimulateNetworkConnectionChange( |
293 net::NetworkChangeNotifier::CONNECTION_WIFI); | 293 net::NetworkChangeNotifier::CONNECTION_WIFI); |
294 EXPECT_FALSE(was_notified()); | 294 EXPECT_FALSE(was_notified()); |
295 | 295 |
296 SimulateEulaAccepted(); | 296 SimulateEulaAccepted(); |
297 EXPECT_FALSE(was_notified()); | 297 EXPECT_FALSE(was_notified()); |
298 } | 298 } |
OLD | NEW |