summaryrefslogtreecommitdiffstats
path: root/webkit/glue/multipart_response_delegate_unittest.cc
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 00:22:26 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 00:22:26 +0000
commitd8f372ad864e13f3f06bebec3a1189b8f8583ccc (patch)
tree1b5d273c0efe4f8f8e9264cc6b4a24d70642df48 /webkit/glue/multipart_response_delegate_unittest.cc
parente33ebaf12c46d2ab390394c9662320281cf926a8 (diff)
downloadchromium_src-d8f372ad864e13f3f06bebec3a1189b8f8583ccc.zip
chromium_src-d8f372ad864e13f3f06bebec3a1189b8f8583ccc.tar.gz
chromium_src-d8f372ad864e13f3f06bebec3a1189b8f8583ccc.tar.bz2
Support playback & seeking in media files over 2G.
BUG=95805 TEST=unittests of touched files pass, manually tested w/ sonyh2.webm which is >5G (internal only), and trybots. Review URL: http://codereview.chromium.org/8349009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/multipart_response_delegate_unittest.cc')
-rw-r--r--webkit/glue/multipart_response_delegate_unittest.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/webkit/glue/multipart_response_delegate_unittest.cc b/webkit/glue/multipart_response_delegate_unittest.cc
index bebb9f0..31acd21 100644
--- a/webkit/glue/multipart_response_delegate_unittest.cc
+++ b/webkit/glue/multipart_response_delegate_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -566,12 +566,14 @@ TEST(MultipartResponseTest, MultipartContentRangesTest) {
WebURLResponse response1;
response1.initialize();
response1.setMIMEType("application/pdf");
- response1.setHTTPHeaderField("Content-Length", "200");
- response1.setHTTPHeaderField("Content-Range", "bytes 1000-1050/5000");
+ response1.setHTTPHeaderField("Content-Length", "200"); // Ignored!
+ // Use intentionally >32bit values to check they are handled correctly.
+ response1.setHTTPHeaderField("Content-Range",
+ "bytes 5000000000-5000000050/6000000000");
- int content_range_lower_bound = 0;
- int content_range_upper_bound = 0;
- int content_range_instance_size = 0;
+ int64 content_range_lower_bound = 0;
+ int64 content_range_upper_bound = 0;
+ int64 content_range_instance_size = 0;
bool result = MultipartResponseDelegate::ReadContentRanges(
response1, &content_range_lower_bound,
@@ -579,8 +581,9 @@ TEST(MultipartResponseTest, MultipartContentRangesTest) {
&content_range_instance_size);
EXPECT_EQ(result, true);
- EXPECT_EQ(content_range_lower_bound, 1000);
- EXPECT_EQ(content_range_upper_bound, 1050);
+ EXPECT_EQ(content_range_lower_bound, 5e9);
+ EXPECT_EQ(content_range_upper_bound, 5e9+50);
+ EXPECT_EQ(content_range_instance_size, 6e9);
WebURLResponse response2;
response2.initialize();