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

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

Issue 7205011: Revert 89532 - Not allow compression when requesting multimedia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/media/buffered_resource_loader.cc ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/media/buffered_resource_loader_unittest.cc
===================================================================
--- webkit/glue/media/buffered_resource_loader_unittest.cc (revision 89545)
+++ webkit/glue/media/buffered_resource_loader_unittest.cc (working copy)
@@ -3,17 +3,14 @@
// found in the LICENSE file.
#include <algorithm>
-#include <string>
#include "base/format_macros.h"
#include "base/stringprintf.h"
#include "net/base/net_errors.h"
-#include "net/http/http_request_headers.h"
#include "net/http/http_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/media/buffered_resource_loader.h"
@@ -33,7 +30,6 @@
using ::testing::ReturnRef;
using ::testing::SetArgumentPointee;
using ::testing::StrictMock;
-using ::testing::Truly;
using ::testing::NiceMock;
using ::testing::WithArgs;
@@ -69,14 +65,6 @@
loader->didFail(NULL, error);
}
-// Predicate that tests that request disallows compressed data.
-static bool CorrectAcceptEncoding(const WebKit::WebURLRequest &request) {
- std::string value = request.httpHeaderField(
- WebString::fromUTF8(net::HttpRequestHeaders::kAcceptEncoding)).utf8();
- return (value.find("identity;q=1") != std::string::npos) &&
- (value.find("*;q=0") != std::string::npos);
-}
-
class BufferedResourceLoaderTest : public testing::Test {
public:
BufferedResourceLoaderTest()
@@ -110,8 +98,7 @@
void Start() {
InSequence s;
- EXPECT_CALL(*url_loader_, loadAsynchronously(Truly(CorrectAcceptEncoding),
- loader_.get()));
+ EXPECT_CALL(*url_loader_, loadAsynchronously(_, loader_.get()));
loader_->Start(
NewCallback(this, &BufferedResourceLoaderTest::StartCallback),
NewCallback(this, &BufferedResourceLoaderTest::NetworkCallback),
« no previous file with comments | « webkit/glue/media/buffered_resource_loader.cc ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698