Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Unified Diff: trunk/src/ppapi/proxy/file_chooser_resource_unittest.cc

Issue 23647008: Revert 221284 "Pepper: Move FileRef to the "new" resource proxy." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/ppapi/proxy/file_chooser_resource.cc ('k') | trunk/src/ppapi/proxy/file_io_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ppapi/proxy/file_chooser_resource_unittest.cc
===================================================================
--- trunk/src/ppapi/proxy/file_chooser_resource_unittest.cc (revision 221543)
+++ trunk/src/ppapi/proxy/file_chooser_resource_unittest.cc (working copy)
@@ -5,7 +5,6 @@
#include "base/message_loop/message_loop.h"
#include "ppapi/c/dev/ppb_file_chooser_dev.h"
#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/proxy/file_chooser_resource.h"
#include "ppapi/proxy/locking_resource_releaser.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -92,14 +91,13 @@
reply_params.set_result(PP_OK);
// Synthesize a response with one file ref in it. Note that it must have a
- // pending_host_resource_id set. Since there isn't actually a host, this can
- // be whatever we want.
- std::vector<FileRefCreateInfo> create_info_array;
- FileRefCreateInfo create_info;
- create_info.file_system_type = PP_FILESYSTEMTYPE_EXTERNAL;
- create_info.display_name = "bar";
- create_info.browser_pending_host_resource_id = 12;
- create_info.renderer_pending_host_resource_id = 15;
+ // host resource value set or deserialization will fail. Since there isn't
+ // actually a host, this can be whatever we want.
+ std::vector<PPB_FileRef_CreateInfo> create_info_array;
+ PPB_FileRef_CreateInfo create_info;
+ create_info.resource.SetHostResource(pp_instance(), 123);
+ create_info.path = "foo/bar";
+ create_info.name = "baz";
create_info_array.push_back(create_info);
ASSERT_TRUE(plugin_dispatcher()->OnMessageReceived(
PpapiPluginMsg_ResourceReply(reply_params,
@@ -117,8 +115,9 @@
{
ProxyAutoLock lock;
ScopedPPVar release_name_var(ScopedPPVar::PassRef(), name_var);
- EXPECT_VAR_IS_STRING("bar", name_var);
+ EXPECT_VAR_IS_STRING(create_info.name, name_var);
}
+ // Path should be undefined since it's external filesystem.
PP_Var path_var(file_ref_iface->GetPath(dest[0]));
{
ProxyAutoLock lock;
« no previous file with comments | « trunk/src/ppapi/proxy/file_chooser_resource.cc ('k') | trunk/src/ppapi/proxy/file_io_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698