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

Unified Diff: webkit/glue/media/media_resource_loader_bridge_factory_unittest.cc

Issue 5756004: Separate BufferedDataSource and BufferedResourceLoader into two files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inlining + removing Is...Protocol methods and getting rid of GetBufferedFirstBytePosition Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: webkit/glue/media/media_resource_loader_bridge_factory_unittest.cc
diff --git a/webkit/glue/media/media_resource_loader_bridge_factory_unittest.cc b/webkit/glue/media/media_resource_loader_bridge_factory_unittest.cc
deleted file mode 100644
index 4c0126b74eb7d8f3b0635bf3ff9c7d4e3adab5e0..0000000000000000000000000000000000000000
--- a/webkit/glue/media/media_resource_loader_bridge_factory_unittest.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2009 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.
-
-#include "net/http/http_util.h"
-#include "webkit/glue/media/media_resource_loader_bridge_factory.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace webkit_glue {
-
-TEST(MediaResourceLoaderBridgeFactoryTest, GenerateHeaders) {
- static const struct {
- const bool success;
- const int64 first_byte_position;
- const int64 last_byte_position;
- } data[] = {
- { false, -1, -1 },
- { false, -5, 0 },
- { false, 100, 0 },
- { true, 0, -1 },
- { true, 0, 0 },
- { true, 100, 100 },
- { true, 50, -1 },
- { true, 10000, -1 },
- { true, 50, 100 },
- };
-
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
- std::string headers = MediaResourceLoaderBridgeFactory::GenerateHeaders(
- data[i].first_byte_position, data[i].last_byte_position);
- std::vector<net::HttpByteRange> ranges;
- bool ret = net::HttpUtil::ParseRanges(headers, &ranges);
- EXPECT_EQ(data[i].success, ret);
- if (ret) {
- EXPECT_EQ(1u, ranges.size());
- EXPECT_EQ(data[i].first_byte_position,
- ranges[0].first_byte_position());
- EXPECT_EQ(data[i].last_byte_position,
- ranges[0].last_byte_position());
- }
- }
-}
-
-} // namespace webkit_glue

Powered by Google App Engine
This is Rietveld 408576698