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

Side by Side Diff: media/blink/multibuffer_data_source_unittest.cc

Issue 1370923002: Enforce marking "override" for functions overriding Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed one Created 5 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 unified diff | Download patch
« no previous file with comments | « content/renderer/webscrollbarbehavior_impl_gtkoraura.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "media/base/media_log.h" 8 #include "media/base/media_log.h"
9 #include "media/base/mock_filters.h" 9 #include "media/base/mock_filters.h"
10 #include "media/base/test_helpers.h" 10 #include "media/base/test_helpers.h"
(...skipping 29 matching lines...) Expand all
40 class TestMultiBufferDataProvider; 40 class TestMultiBufferDataProvider;
41 41
42 std::set<TestMultiBufferDataProvider*> test_data_providers; 42 std::set<TestMultiBufferDataProvider*> test_data_providers;
43 43
44 class TestMultiBufferDataProvider : public ResourceMultiBufferDataProvider { 44 class TestMultiBufferDataProvider : public ResourceMultiBufferDataProvider {
45 public: 45 public:
46 TestMultiBufferDataProvider(UrlData* url_data, MultiBuffer::BlockId pos) 46 TestMultiBufferDataProvider(UrlData* url_data, MultiBuffer::BlockId pos)
47 : ResourceMultiBufferDataProvider(url_data, pos), loading_(false) { 47 : ResourceMultiBufferDataProvider(url_data, pos), loading_(false) {
48 CHECK(test_data_providers.insert(this).second); 48 CHECK(test_data_providers.insert(this).second);
49 } 49 }
50 ~TestMultiBufferDataProvider() { 50 ~TestMultiBufferDataProvider() override {
51 CHECK_EQ(static_cast<size_t>(1), test_data_providers.erase(this)); 51 CHECK_EQ(static_cast<size_t>(1), test_data_providers.erase(this));
52 } 52 }
53 void Start() override { 53 void Start() override {
54 // Create a mock active loader. 54 // Create a mock active loader.
55 // Keep track of active loading state via loadAsynchronously() and cancel(). 55 // Keep track of active loading state via loadAsynchronously() and cancel().
56 NiceMock<MockWebURLLoader>* url_loader = new NiceMock<MockWebURLLoader>(); 56 NiceMock<MockWebURLLoader>* url_loader = new NiceMock<MockWebURLLoader>();
57 ON_CALL(*url_loader, cancel()).WillByDefault(Assign(&loading_, false)); 57 ON_CALL(*url_loader, cancel()).WillByDefault(Assign(&loading_, false));
58 loading_ = true; 58 loading_ = true;
59 active_loader_.reset( 59 active_loader_.reset(
60 new ActiveLoader(scoped_ptr<WebURLLoader>(url_loader))); 60 new ActiveLoader(scoped_ptr<WebURLLoader>(url_loader)));
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 ASSERT_TRUE(active_loader()); 1196 ASSERT_TRUE(active_loader());
1197 1197
1198 EXPECT_CALL(*this, ReadCallback(kDataSize)); 1198 EXPECT_CALL(*this, ReadCallback(kDataSize));
1199 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2)); 1199 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
1200 ReceiveData(kDataSize); 1200 ReceiveData(kDataSize);
1201 1201
1202 EXPECT_FALSE(active_loader_allownull()); 1202 EXPECT_FALSE(active_loader_allownull());
1203 } 1203 }
1204 1204
1205 } // namespace media 1205 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/webscrollbarbehavior_impl_gtkoraura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698