Index: ppapi/tests/test_post_message.h |
diff --git a/ppapi/tests/test_post_message.h b/ppapi/tests/test_post_message.h |
index f0818809067aab73435bedfc2f69546c845e10e5..042f8f6a9dc101d391cdc723af217c9858b4ff28 100644 |
--- a/ppapi/tests/test_post_message.h |
+++ b/ppapi/tests/test_post_message.h |
@@ -12,7 +12,8 @@ |
class TestPostMessage : public TestCase { |
public: |
- explicit TestPostMessage(TestingInstance* instance) : TestCase(instance) {} |
+ explicit TestPostMessage(TestingInstance* instance); |
+ virtual ~TestPostMessage(); |
private: |
// TestCase implementation. |
@@ -38,6 +39,15 @@ class TestPostMessage : public TestCase { |
// Returns true on success, false on failure. |
bool ClearListeners(); |
+ // Wait for pending messages; return the number of messages that were pending |
+ // at the time of invocation. |
+ int WaitForMessages(); |
+ |
+ // Test that we can send a message from Instance::Init. Note the actual |
+ // message is sent in TestPostMessage::Init, and this test simply makes sure |
+ // we got it. |
+ std::string TestSendInInit(); |
+ |
// Test some basic functionality; make sure we can send data successfully |
// in both directions. |
std::string TestSendingData(); |
@@ -61,6 +71,10 @@ class TestPostMessage : public TestCase { |
// This is used to store pp::Var objects we receive via a call to |
// HandleMessage. |
VarVector message_data_; |
+ |
+ // Used by WaitForMessages. Indicates whether we have received a message |
+ // indicating we are finished waiting for messages for now. |
+ bool finished_waiting_; |
}; |
#endif // PPAPI_TESTS_TEST_POST_MESSAGE_H_ |