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

Unified Diff: ppapi/tests/test_file_ref.cc

Issue 4747001: Move URLLoader, URLRequestInfo, and URLResponseInfo out of the dev directory... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « ppapi/tests/test_c_includes.c ('k') | ppapi/tests/test_url_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_file_ref.cc
===================================================================
--- ppapi/tests/test_file_ref.cc (revision 65624)
+++ ppapi/tests/test_file_ref.cc (working copy)
@@ -12,11 +12,11 @@
#include "ppapi/cpp/dev/file_io_dev.h"
#include "ppapi/cpp/dev/file_ref_dev.h"
#include "ppapi/cpp/dev/file_system_dev.h"
-#include "ppapi/cpp/dev/url_loader_dev.h"
-#include "ppapi/cpp/dev/url_request_info_dev.h"
-#include "ppapi/cpp/dev/url_response_info_dev.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
+#include "ppapi/cpp/url_loader.h"
+#include "ppapi/cpp/url_request_info.h"
+#include "ppapi/cpp/url_response_info.h"
#include "ppapi/tests/test_utils.h"
#include "ppapi/tests/testing_instance.h"
@@ -68,27 +68,27 @@
if (file_ref_temp.GetFileSystemType() != PP_FILESYSTEMTYPE_LOCALTEMPORARY)
return "file_ref_temp expected to be temporary.";
- pp::URLRequestInfo_Dev request;
+ pp::URLRequestInfo request;
request.SetURL("test_url_loader_data/hello.txt");
request.SetStreamToFile(true);
TestCompletionCallback callback;
- pp::URLLoader_Dev loader(*instance_);
+ pp::URLLoader loader(*instance_);
int32_t rv = loader.Open(request, callback);
if (rv == PP_ERROR_WOULDBLOCK)
rv = callback.WaitForResult();
if (rv != PP_OK)
return "URLLoader::Open() failed.";
- pp::URLResponseInfo_Dev response_info(loader.GetResponseInfo());
+ pp::URLResponseInfo response_info(loader.GetResponseInfo());
if (response_info.is_null())
return "URLLoader::GetResponseInfo returned null";
int32_t status_code = response_info.GetStatusCode();
if (status_code != 200)
return "Unexpected HTTP status code";
- pp::FileRef_Dev file_ref_ext(response_info.GetBody());
+ pp::FileRef_Dev file_ref_ext(response_info.GetBodyAsFileRef());
if (file_ref_ext.GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL)
return "file_ref_ext expected to be external.";
@@ -117,27 +117,27 @@
if (name != "/")
return ReportMismatch("FileRef::GetName", name, "/");
- pp::URLRequestInfo_Dev request;
+ pp::URLRequestInfo request;
request.SetURL("test_url_loader_data/hello.txt");
request.SetStreamToFile(true);
TestCompletionCallback callback;
- pp::URLLoader_Dev loader(*instance_);
+ pp::URLLoader loader(*instance_);
int32_t rv = loader.Open(request, callback);
if (rv == PP_ERROR_WOULDBLOCK)
rv = callback.WaitForResult();
if (rv != PP_OK)
return "URLLoader::Open() failed.";
- pp::URLResponseInfo_Dev response_info(loader.GetResponseInfo());
+ pp::URLResponseInfo response_info(loader.GetResponseInfo());
if (response_info.is_null())
return "URLLoader::GetResponseInfo returned null";
int32_t status_code = response_info.GetStatusCode();
if (status_code != 200)
return "Unexpected HTTP status code";
- pp::FileRef_Dev file_ref_ext(response_info.GetBody());
+ pp::FileRef_Dev file_ref_ext(response_info.GetBodyAsFileRef());
name = file_ref_ext.GetName().AsString();
if (name != "")
return ReportMismatch("FileRef::GetName", name, "<empty string>");
@@ -161,27 +161,27 @@
if (path != kTempFilePath)
return ReportMismatch("FileRef::GetPath", path, kTempFilePath);
- pp::URLRequestInfo_Dev request;
+ pp::URLRequestInfo request;
request.SetURL("test_url_loader_data/hello.txt");
request.SetStreamToFile(true);
TestCompletionCallback callback;
- pp::URLLoader_Dev loader(*instance_);
+ pp::URLLoader loader(*instance_);
int32_t rv = loader.Open(request, callback);
if (rv == PP_ERROR_WOULDBLOCK)
rv = callback.WaitForResult();
if (rv != PP_OK)
return "URLLoader::Open() failed.";
- pp::URLResponseInfo_Dev response_info(loader.GetResponseInfo());
+ pp::URLResponseInfo response_info(loader.GetResponseInfo());
if (response_info.is_null())
return "URLLoader::GetResponseInfo returned null";
int32_t status_code = response_info.GetStatusCode();
if (status_code != 200)
return "Unexpected HTTP status code";
- pp::FileRef_Dev file_ref_ext(response_info.GetBody());
+ pp::FileRef_Dev file_ref_ext(response_info.GetBodyAsFileRef());
if (!file_ref_ext.GetPath().is_undefined())
return "The path of an external FileRef should be void.";
@@ -216,27 +216,27 @@
if (parent_path != "/")
return ReportMismatch("FileRef::GetParent", parent_path, "/");
- pp::URLRequestInfo_Dev request;
+ pp::URLRequestInfo request;
request.SetURL("test_url_loader_data/hello.txt");
request.SetStreamToFile(true);
TestCompletionCallback callback;
- pp::URLLoader_Dev loader(*instance_);
+ pp::URLLoader loader(*instance_);
int32_t rv = loader.Open(request, callback);
if (rv == PP_ERROR_WOULDBLOCK)
rv = callback.WaitForResult();
if (rv != PP_OK)
return "URLLoader::Open() failed.";
- pp::URLResponseInfo_Dev response_info(loader.GetResponseInfo());
+ pp::URLResponseInfo response_info(loader.GetResponseInfo());
if (response_info.is_null())
return "URLLoader::GetResponseInfo returned null";
int32_t status_code = response_info.GetStatusCode();
if (status_code != 200)
return "Unexpected HTTP status code";
- pp::FileRef_Dev file_ref_ext(response_info.GetBody());
+ pp::FileRef_Dev file_ref_ext(response_info.GetBodyAsFileRef());
if (!file_ref_ext.GetParent().is_null())
return "The parent of an external FileRef should be null.";
« no previous file with comments | « ppapi/tests/test_c_includes.c ('k') | ppapi/tests/test_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698