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

Side by Side Diff: webkit/media/test_response_generator.h

Issue 10698139: Write file:// tests for BufferedDataSource and fix some bugs as a result. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: remove buffered_bytes_ Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ 5 #ifndef WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_
6 #define WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ 6 #define WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
(...skipping 27 matching lines...) Expand all
38 WebKit::WebURLResponse Generate206(int64 first_byte_offset); 38 WebKit::WebURLResponse Generate206(int64 first_byte_offset);
39 39
40 // Generates a custom HTTP 206 response starting from |first_byte_offset| 40 // Generates a custom HTTP 206 response starting from |first_byte_offset|
41 // until the end of the resource. You can tweak what gets included in the 41 // until the end of the resource. You can tweak what gets included in the
42 // headers via |flags|. 42 // headers via |flags|.
43 WebKit::WebURLResponse Generate206(int64 first_byte_offset, Flags flags); 43 WebKit::WebURLResponse Generate206(int64 first_byte_offset, Flags flags);
44 44
45 // Generates a regular HTTP 404 response. 45 // Generates a regular HTTP 404 response.
46 WebKit::WebURLResponse Generate404(); 46 WebKit::WebURLResponse Generate404();
47 47
48 // Generates a file:// response starting from |first_byte_offset| until the
49 // end of the resource.
50 //
51 // If |first_byte_offset| is negative a response containing no content length
52 // will be returned.
53 WebKit::WebURLResponse GenerateFileResponse(int64 first_byte_offset);
54
48 const GURL& gurl() { return gurl_; } 55 const GURL& gurl() { return gurl_; }
49 int64 content_length() { return content_length_; } 56 int64 content_length() { return content_length_; }
50 57
51 private: 58 private:
52 GURL gurl_; 59 GURL gurl_;
53 int64 content_length_; 60 int64 content_length_;
54 61
55 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); 62 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator);
56 }; 63 };
57 64
58 } // namespace webkit_media 65 } // namespace webkit_media
59 66
60 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ 67 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698