Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / tests / nacl_io_test / fake_ppapi / fake_pepper_interface_url_loader.h
index 5068f2d..e333f8b 100644 (file)
 class FakeURLLoaderEntity {
  public:
   explicit FakeURLLoaderEntity(const std::string& body);
+  FakeURLLoaderEntity(const std::string& to_repeat, off_t size);
 
   const std::string& body() const { return body_; }
+  off_t size() { return size_; }
+
+  size_t Read(void* buffer, size_t count, off_t offset);
 
  private:
   std::string body_;
+  off_t size_;
+  bool repeat_;
 };
 
 class FakeURLLoaderServer {
@@ -33,6 +39,10 @@ class FakeURLLoaderServer {
   bool AddEntity(const std::string& url,
                  const std::string& body,
                  FakeURLLoaderEntity** out_entity);
+  bool AddEntity(const std::string& url,
+                 const std::string& body,
+                 off_t size,
+                 FakeURLLoaderEntity** out_entity);
   bool AddError(const std::string& url,
                 int http_status_code);
   FakeURLLoaderEntity* GetEntity(const std::string& url);