OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/WebURLError.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" |
12 | 12 |
13 namespace webkit_media { | 13 namespace webkit_media { |
14 | 14 |
15 // Generates WebURLErrors and WebURLResponses suitable for testing purposes. | 15 // Generates WebURLErrors and WebURLResponses suitable for testing purposes. |
16 class TestResponseGenerator { | 16 class TestResponseGenerator { |
17 public: | 17 public: |
18 enum Flags { | 18 enum Flags { |
19 kNormal = 0, | 19 kNormal = 0, |
20 kNoAcceptRanges = 1 << 0, // Don't include Accept-Ranges in 206 response. | 20 kNoAcceptRanges = 1 << 0, // Don't include Accept-Ranges in 206 response. |
21 kNoContentRange = 1 << 1, // Don't include Content-Range in 206 response. | 21 kNoContentRange = 1 << 1, // Don't include Content-Range in 206 response. |
(...skipping 28 matching lines...) Expand all Loading... |
50 private: | 50 private: |
51 GURL gurl_; | 51 GURL gurl_; |
52 int64 content_length_; | 52 int64 content_length_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); | 54 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace webkit_media | 57 } // namespace webkit_media |
58 | 58 |
59 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ | 59 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ |
OLD | NEW |