| 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_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 ~DOMMessageQueue() override; | 436 ~DOMMessageQueue() override; |
| 437 | 437 |
| 438 // Removes all messages in the message queue. | 438 // Removes all messages in the message queue. |
| 439 void ClearQueue(); | 439 void ClearQueue(); |
| 440 | 440 |
| 441 // Wait for the next message to arrive. |message| will be set to the next | 441 // Wait for the next message to arrive. |message| will be set to the next |
| 442 // message. Returns true on success. | 442 // message. Returns true on success. |
| 443 bool WaitForMessage(std::string* message) WARN_UNUSED_RESULT; | 443 bool WaitForMessage(std::string* message) WARN_UNUSED_RESULT; |
| 444 | 444 |
| 445 // If there is a message in the queue, then copies it to |message| and returns |
| 446 // true. Otherwise (if the queue is empty), returns false. |
| 447 bool PopMessage(std::string* message) WARN_UNUSED_RESULT; |
| 448 |
| 445 // Overridden NotificationObserver methods. | 449 // Overridden NotificationObserver methods. |
| 446 void Observe(int type, | 450 void Observe(int type, |
| 447 const NotificationSource& source, | 451 const NotificationSource& source, |
| 448 const NotificationDetails& details) override; | 452 const NotificationDetails& details) override; |
| 449 | 453 |
| 450 // Overridden WebContentsObserver methods. | 454 // Overridden WebContentsObserver methods. |
| 451 void RenderProcessGone(base::TerminationStatus status) override; | 455 void RenderProcessGone(base::TerminationStatus status) override; |
| 452 | 456 |
| 453 private: | 457 private: |
| 454 NotificationRegistrar registrar_; | 458 NotificationRegistrar registrar_; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 755 |
| 752 private: | 756 private: |
| 753 PwnMessageHelper(); // Not instantiable. | 757 PwnMessageHelper(); // Not instantiable. |
| 754 | 758 |
| 755 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); | 759 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); |
| 756 }; | 760 }; |
| 757 | 761 |
| 758 } // namespace content | 762 } // namespace content |
| 759 | 763 |
| 760 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 764 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |