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

Side by Side Diff: webkit/media/buffered_resource_loader_unittest.cc

Issue 10837118: Dead code elimination: scythe.chrome_functions:segment.path %media% edition, round 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 static const int kMaxBufferCapacity = 20 * 1024 * 1024; 281 static const int kMaxBufferCapacity = 20 * 1024 * 1024;
282 EXPECT_LE(loader_->buffer_.forward_capacity(), kMaxBufferCapacity); 282 EXPECT_LE(loader_->buffer_.forward_capacity(), kMaxBufferCapacity);
283 EXPECT_LE(loader_->buffer_.backward_capacity(), kMaxBufferCapacity); 283 EXPECT_LE(loader_->buffer_.backward_capacity(), kMaxBufferCapacity);
284 } 284 }
285 285
286 MOCK_METHOD1(StartCallback, void(BufferedResourceLoader::Status)); 286 MOCK_METHOD1(StartCallback, void(BufferedResourceLoader::Status));
287 MOCK_METHOD2(ReadCallback, void(BufferedResourceLoader::Status, int)); 287 MOCK_METHOD2(ReadCallback, void(BufferedResourceLoader::Status, int));
288 MOCK_METHOD1(LoadingCallback, void(BufferedResourceLoader::LoadingState)); 288 MOCK_METHOD1(LoadingCallback, void(BufferedResourceLoader::LoadingState));
289 MOCK_METHOD1(ProgressCallback, void(int64)); 289 MOCK_METHOD1(ProgressCallback, void(int64));
290 290
291 // Accessors for private variables on |loader_|.
292 int forward_bytes() { return loader_->buffer_.forward_bytes(); }
293 int forward_capacity() { return loader_->buffer_.forward_capacity(); }
294
295 protected: 291 protected:
296 GURL gurl_; 292 GURL gurl_;
297 int64 first_position_; 293 int64 first_position_;
298 int64 last_position_; 294 int64 last_position_;
299 295
300 scoped_ptr<BufferedResourceLoader> loader_; 296 scoped_ptr<BufferedResourceLoader> loader_;
301 NiceMock<MockWebURLLoader>* url_loader_; 297 NiceMock<MockWebURLLoader>* url_loader_;
302 298
303 MockWebFrameClient client_; 299 MockWebFrameClient client_;
304 WebView* view_; 300 WebView* view_;
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 ExpectContentRangeFailure("bytes 20-10/400"); 1122 ExpectContentRangeFailure("bytes 20-10/400");
1127 1123
1128 ExpectContentRangeSuccess("bytes 0-499/500", 0, 499, 500); 1124 ExpectContentRangeSuccess("bytes 0-499/500", 0, 499, 500);
1129 ExpectContentRangeSuccess("bytes 0-0/500", 0, 0, 500); 1125 ExpectContentRangeSuccess("bytes 0-0/500", 0, 0, 500);
1130 ExpectContentRangeSuccess("bytes 10-11/50", 10, 11, 50); 1126 ExpectContentRangeSuccess("bytes 10-11/50", 10, 11, 50);
1131 ExpectContentRangeSuccess("bytes 10-11/*", 10, 11, 1127 ExpectContentRangeSuccess("bytes 10-11/*", 10, 11,
1132 kPositionNotSpecified); 1128 kPositionNotSpecified);
1133 } 1129 }
1134 1130
1135 } // namespace webkit_media 1131 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698