OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int m_callbackCount; | 78 int m_callbackCount; |
79 }; | 79 }; |
80 | 80 |
81 class ExitTask | 81 class ExitTask |
82 : public blink::WebThread::Task { | 82 : public blink::WebThread::Task { |
83 public: | 83 public: |
84 ExitTask(blink::WebThread* thread) | 84 ExitTask(blink::WebThread* thread) |
85 : m_thread(thread) | 85 : m_thread(thread) |
86 { | 86 { |
87 } | 87 } |
88 virtual void run() OVERRIDE | 88 virtual void run() override |
89 { | 89 { |
90 m_thread->exitRunLoop(); | 90 m_thread->exitRunLoop(); |
91 } | 91 } |
92 | 92 |
93 private: | 93 private: |
94 blink::WebThread* m_thread; | 94 blink::WebThread* m_thread; |
95 }; | 95 }; |
96 | 96 |
97 class NetworkStateNotifierTest : public testing::Test { | 97 class NetworkStateNotifierTest : public testing::Test { |
98 public: | 98 public: |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 m_notifier.addObserver(&observer2, executionContext2()); | 271 m_notifier.addObserver(&observer2, executionContext2()); |
272 m_notifier.removeObserver(&observer1, executionContext()); | 272 m_notifier.removeObserver(&observer1, executionContext()); |
273 m_notifier.removeObserver(&observer2, executionContext2()); | 273 m_notifier.removeObserver(&observer2, executionContext2()); |
274 | 274 |
275 setType(blink::ConnectionTypeBluetooth); | 275 setType(blink::ConnectionTypeBluetooth); |
276 EXPECT_EQ(observer1.observedType(), blink::ConnectionTypeNone); | 276 EXPECT_EQ(observer1.observedType(), blink::ConnectionTypeNone); |
277 EXPECT_EQ(observer2.observedType(), blink::ConnectionTypeNone); | 277 EXPECT_EQ(observer2.observedType(), blink::ConnectionTypeNone); |
278 } | 278 } |
279 | 279 |
280 } // namespace blink | 280 } // namespace blink |
OLD | NEW |