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 #ifndef CONTENT_PUBLIC_TEST_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_UTILS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 private: | 229 private: |
230 bool seen_; | 230 bool seen_; |
231 bool running_; | 231 bool running_; |
232 NotificationRegistrar registrar_; | 232 NotificationRegistrar registrar_; |
233 | 233 |
234 ConditionTestCallback callback_; | 234 ConditionTestCallback callback_; |
235 | 235 |
236 NotificationSource source_; | 236 NotificationSource source_; |
237 NotificationDetails details_; | 237 NotificationDetails details_; |
238 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 238 std::unique_ptr<base::RunLoop> run_loop_; |
239 | 239 |
240 DISALLOW_COPY_AND_ASSIGN(WindowedNotificationObserver); | 240 DISALLOW_COPY_AND_ASSIGN(WindowedNotificationObserver); |
241 }; | 241 }; |
242 | 242 |
243 // Unit tests can use code which runs in the utility process by having it run on | 243 // Unit tests can use code which runs in the utility process by having it run on |
244 // an in-process utility thread. This eliminates having two code paths in | 244 // an in-process utility thread. This eliminates having two code paths in |
245 // production code to deal with unit tests, and also helps with the binary | 245 // production code to deal with unit tests, and also helps with the binary |
246 // separation on Windows since chrome.dll doesn't need to call into Blink code | 246 // separation on Windows since chrome.dll doesn't need to call into Blink code |
247 // for some utility code to handle the single process case. | 247 // for some utility code to handle the single process case. |
248 // Include this class as a member variable in your test harness if you take | 248 // Include this class as a member variable in your test harness if you take |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 void WebContentsDestroyed() override; | 304 void WebContentsDestroyed() override; |
305 | 305 |
306 base::RunLoop run_loop_; | 306 base::RunLoop run_loop_; |
307 | 307 |
308 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); | 308 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); |
309 }; | 309 }; |
310 | 310 |
311 } // namespace content | 311 } // namespace content |
312 | 312 |
313 #endif // CONTENT_PUBLIC_TEST_TEST_UTILS_H_ | 313 #endif // CONTENT_PUBLIC_TEST_TEST_UTILS_H_ |
OLD | NEW |