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