summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_post_message.h
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 19:21:21 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 19:21:21 +0000
commit9260b8f0d823ba65403bd4924bf07e7ab67b9250 (patch)
tree62a24e4217706af50c836eedb29745055780b485 /ppapi/tests/test_post_message.h
parent2391c42b05c58cd8e00a541c4b6c856f00d1a119 (diff)
downloadchromium_src-9260b8f0d823ba65403bd4924bf07e7ab67b9250.zip
chromium_src-9260b8f0d823ba65403bd4924bf07e7ab67b9250.tar.gz
chromium_src-9260b8f0d823ba65403bd4924bf07e7ab67b9250.tar.bz2
Reland http://codereview.chromium.org/7821001/
Add test for calling PostMessage during Init. Deflakify TestPostMessage. BUG=93260,91768 TEST=This test TBR=dmichael Review URL: http://codereview.chromium.org/7834049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_post_message.h')
-rw-r--r--ppapi/tests/test_post_message.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ppapi/tests/test_post_message.h b/ppapi/tests/test_post_message.h
index f081880..af1dc36 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();