Chromium Code Reviews| Index: ppapi/tests/test_post_message.h |
| diff --git a/ppapi/tests/test_post_message.h b/ppapi/tests/test_post_message.h |
| index 2f2f6287c087d4cab70a64505ddc4f1bb9964334..90ed3c12e0bfcf4eb606b69943e8386c9767434c 100644 |
| --- a/ppapi/tests/test_post_message.h |
| +++ b/ppapi/tests/test_post_message.h |
| @@ -8,6 +8,9 @@ |
| #include <string> |
| #include <vector> |
| +#include "ppapi/c/dev/ppb_var_resource_dev.h" |
| +#include "ppapi/c/ppb_file_system.h" |
| +#include "ppapi/c/ppb_var.h" |
| #include "ppapi/tests/test_case.h" |
| class TestPostMessage : public TestCase { |
| @@ -38,6 +41,12 @@ class TestPostMessage : public TestCase { |
| // JavaScript function which returns the variable to post. |
| bool PostMessageFromJavaScript(const std::string& func); |
| + // Posts a message from JavaScript to the plugin. |func| should be a |
| + // JavaScript function(callback) which calls |callback| with the variable to |
| + // post. To wait for this message to be posted on the plugin side, use |
| + // WaitForMessagesAsync, instead of WaitForMessages. |
| + bool PostMessageFromJavaScriptAsync(const std::string& func); |
| + |
| // Clear any listeners that have been added using AddEchoingListener by |
| // calling removeEventListener for each. |
| // Returns true on success, false on failure. |
| @@ -47,6 +56,10 @@ class TestPostMessage : public TestCase { |
| // at the time of invocation. |
| int WaitForMessages(); |
| + // Wait for pending messages sent by PostMessageFromJavaScriptAsync; return |
| + // the number of messages that were pending at the time of invocation. |
| + int WaitForMessagesAsync(); |
| + |
| // Verifies that the given javascript assertions are true of the message |
| // (|test_data|) passed via PostMessage(). |
| std::string CheckMessageProperties( |
| @@ -71,6 +84,9 @@ class TestPostMessage : public TestCase { |
| // Test sending Dictionary vars in both directions. |
| std::string TestSendingDictionary(); |
| + // Test sending Resource vars in both directions. |
|
raymes
2013/10/22 05:59:21
nit: This comment is inaccurate. Currently we only
Matt Giuca
2013/10/23 08:05:54
Done.
|
| + std::string TestSendingResource(); |
| + |
| // Test sending a complex var with references and cycles in both directions. |
| std::string TestSendingComplexVar(); |
| @@ -93,6 +109,12 @@ class TestPostMessage : public TestCase { |
| // This is used to store pp::Var objects we receive via a call to |
| // HandleMessage. |
| VarVector message_data_; |
| + |
| + // Interfaces for C APIs. |
| + const PPB_Core* core_interface_; |
| + const PPB_FileSystem* file_system_interface_; |
| + const PPB_Var* var_interface_; |
| + const PPB_VarResource_Dev* var_resource_interface_; |
| }; |
| #endif // PPAPI_TESTS_TEST_POST_MESSAGE_H_ |