OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // See network_change_notifier_android.h for design explanations. | 5 // See network_change_notifier_android.h for design explanations. |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "net/android/network_change_notifier_android.h" | 12 #include "net/android/network_change_notifier_android.h" |
13 #include "net/android/network_change_notifier_delegate_android.h" | 13 #include "net/android/network_change_notifier_delegate_android.h" |
14 #include "net/base/network_change_notifier.h" | 14 #include "net/base/network_change_notifier.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 class NetworkChangeNotifierDelegateAndroidObserver | 21 class NetworkChangeNotifierDelegateAndroidObserver |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 base::Bind( | 207 base::Bind( |
208 &NetworkChangeNotifierObserver::notifications_count, | 208 &NetworkChangeNotifierObserver::notifications_count, |
209 base::Unretained(&connection_type_observer_)), | 209 base::Unretained(&connection_type_observer_)), |
210 base::Bind(&NetworkChangeNotifier::GetConnectionType)); | 210 base::Bind(&NetworkChangeNotifier::GetConnectionType)); |
211 // Check that *all* the observers are notified. | 211 // Check that *all* the observers are notified. |
212 EXPECT_EQ(connection_type_observer_.notifications_count(), | 212 EXPECT_EQ(connection_type_observer_.notifications_count(), |
213 other_connection_type_observer_.notifications_count()); | 213 other_connection_type_observer_.notifications_count()); |
214 } | 214 } |
215 | 215 |
216 } // namespace net | 216 } // namespace net |
OLD | NEW |