OLD | NEW |
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 #include <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 using webkit_glue::MockWebFrameClient; | 38 using webkit_glue::MockWebFrameClient; |
39 using webkit_glue::MockWebURLLoader; | 39 using webkit_glue::MockWebURLLoader; |
40 | 40 |
41 namespace webkit_media { | 41 namespace webkit_media { |
42 | 42 |
43 static const char* kHttpUrl = "http://test"; | 43 static const char* kHttpUrl = "http://test"; |
44 static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing"; | 44 static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing"; |
45 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; | 45 static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; |
46 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; | 46 static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; |
47 static const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing"; | |
48 | 47 |
49 static const int kDataSize = 1024; | 48 static const int kDataSize = 1024; |
50 static const int kHttpOK = 200; | 49 static const int kHttpOK = 200; |
51 static const int kHttpPartialContent = 206; | 50 static const int kHttpPartialContent = 206; |
52 | 51 |
53 enum NetworkState { | 52 enum NetworkState { |
54 NONE, | 53 NONE, |
55 LOADED, | 54 LOADED, |
56 LOADING | 55 LOADING |
57 }; | 56 }; |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 ExpectContentRangeFailure("bytes 20-10/400"); | 1126 ExpectContentRangeFailure("bytes 20-10/400"); |
1128 | 1127 |
1129 ExpectContentRangeSuccess("bytes 0-499/500", 0, 499, 500); | 1128 ExpectContentRangeSuccess("bytes 0-499/500", 0, 499, 500); |
1130 ExpectContentRangeSuccess("bytes 0-0/500", 0, 0, 500); | 1129 ExpectContentRangeSuccess("bytes 0-0/500", 0, 0, 500); |
1131 ExpectContentRangeSuccess("bytes 10-11/50", 10, 11, 50); | 1130 ExpectContentRangeSuccess("bytes 10-11/50", 10, 11, 50); |
1132 ExpectContentRangeSuccess("bytes 10-11/*", 10, 11, | 1131 ExpectContentRangeSuccess("bytes 10-11/*", 10, 11, |
1133 kPositionNotSpecified); | 1132 kPositionNotSpecified); |
1134 } | 1133 } |
1135 | 1134 |
1136 } // namespace webkit_media | 1135 } // namespace webkit_media |
OLD | NEW |