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

Side by Side Diff: webkit/glue/media/buffered_data_source_unittest.cc

Issue 269064: Set os_error to net::ERR_ABORTED instead of 0 or net::ERR_FAILED when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/common/security_filter_peer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "media/base/filters.h" 8 #include "media/base/filters.h"
9 #include "media/base/mock_filter_host.h" 9 #include "media/base/mock_filter_host.h"
10 #include "media/base/mock_filters.h" 10 #include "media/base/mock_filters.h"
(...skipping 30 matching lines...) Expand all
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace webkit_glue { 44 namespace webkit_glue {
45 45
46 // Submit a request completed event to the resource loader due to request 46 // Submit a request completed event to the resource loader due to request
47 // being canceled. Pretending the event is from external. 47 // being canceled. Pretending the event is from external.
48 ACTION_P(RequestCanceled, loader) { 48 ACTION_P(RequestCanceled, loader) {
49 URLRequestStatus status; 49 URLRequestStatus status;
50 status.set_status(URLRequestStatus::CANCELED); 50 status.set_status(URLRequestStatus::CANCELED);
51 status.set_os_error(net::ERR_ABORTED);
51 loader->OnCompletedRequest(status, ""); 52 loader->OnCompletedRequest(status, "");
52 } 53 }
53 54
54 class BufferedResourceLoaderTest : public testing::Test { 55 class BufferedResourceLoaderTest : public testing::Test {
55 public: 56 public:
56 BufferedResourceLoaderTest() { 57 BufferedResourceLoaderTest() {
57 bridge_.reset(new StrictMock<MockResourceLoaderBridge>()); 58 bridge_.reset(new StrictMock<MockResourceLoaderBridge>());
58 59
59 for (int i = 0; i < kDataSize; ++i) 60 for (int i = 0; i < kDataSize; ++i)
60 data_[i] = i; 61 data_[i] = i;
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 StopDataSource(); 758 StopDataSource();
758 } 759 }
759 760
760 TEST_F(BufferedDataSourceTest, FileHasLoadedState) { 761 TEST_F(BufferedDataSourceTest, FileHasLoadedState) {
761 InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED); 762 InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED);
762 ReadDataSourceTimesOut(20, 10); 763 ReadDataSourceTimesOut(20, 10);
763 StopDataSource(); 764 StopDataSource();
764 } 765 }
765 766
766 } // namespace webkit_glue 767 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « chrome/common/security_filter_peer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698