summaryrefslogtreecommitdiffstats
path: root/ppapi/tests
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-02 13:39:15 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-02 13:39:15 +0000
commita273813e2a3b811647ffd150402768b28bb84bbf (patch)
treec40ca9207fed682e4e2f9397d2781fe5f492eb29 /ppapi/tests
parent8976e29cda1d14b899be6f13366dbb34379ca53d (diff)
downloadchromium_src-a273813e2a3b811647ffd150402768b28bb84bbf.zip
chromium_src-a273813e2a3b811647ffd150402768b28bb84bbf.tar.gz
chromium_src-a273813e2a3b811647ffd150402768b28bb84bbf.tar.bz2
[PPAPI] Fixed FileSystems from JavaScript not having a context.
Removed the "open existing file system" overload of PepperFileSystemBrowserHost constructor, replacing it with a method OpenExisting that asynchronously opens the file system, correctly obtaining a FileSystemContext. Rewrote PepperRendererConnection::OnMsgCreateResourceHostsFromHost to deal with having to call an asynchronous function before sending the reply to the plugin. Re-enabled disabled test that was broken due to this bug and added an additional regression test. BUG=314007 Review URL: https://codereview.chromium.org/55133010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r--ppapi/tests/test_post_message.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ppapi/tests/test_post_message.cc b/ppapi/tests/test_post_message.cc
index eb22c7f..df126c7 100644
--- a/ppapi/tests/test_post_message.cc
+++ b/ppapi/tests/test_post_message.cc
@@ -610,6 +610,13 @@ std::string TestPostMessage::TestSendingResource() {
pp::FileRef file_ref(file_system, file_path.c_str());
ASSERT_NE(0, file_ref.pp_resource());
+ // Ensure that the file can be queried.
+ TestCompletionCallbackWithOutput<PP_FileInfo> cc(instance_->pp_instance(),
+ callback_type());
+ cc.WaitForResult(file_ref.Query(cc.GetCallback()));
+ CHECK_CALLBACK_BEHAVIOR(cc);
+ ASSERT_EQ(PP_OK, cc.result());
+
// Read the file and test that its contents match.
pp::FileIO file_io(instance_);
ASSERT_NE(0, file_io.pp_resource());