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

Side by Side Diff: ppapi/shared_impl/media_stream_buffer_manager_unittest.cc

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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
« no previous file with comments | « ppapi/shared_impl/dictionary_var.h ('k') | ppapi/shared_impl/ppb_audio_config_shared.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/shared_memory.h" 6 #include "base/memory/shared_memory.h"
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/shared_impl/media_stream_buffer_manager.h" 8 #include "ppapi/shared_impl/media_stream_buffer_manager.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 12 matching lines...) Expand all
23 return shared_memory.Pass(); 23 return shared_memory.Pass();
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 namespace ppapi { 28 namespace ppapi {
29 29
30 class MockDelegate : public MediaStreamBufferManager::Delegate { 30 class MockDelegate : public MediaStreamBufferManager::Delegate {
31 public: 31 public:
32 MockDelegate() : new_buffer_enqueue_counter_(0) {} 32 MockDelegate() : new_buffer_enqueue_counter_(0) {}
33 virtual void OnNewBufferEnqueued() override { 33 void OnNewBufferEnqueued() override {
34 new_buffer_enqueue_counter_++; 34 new_buffer_enqueue_counter_++;
35 } 35 }
36 36
37 int32_t new_buffer_enqueue_counter_; 37 int32_t new_buffer_enqueue_counter_;
38 }; 38 };
39 39
40 TEST(MediaStreamBufferManager, General) { 40 TEST(MediaStreamBufferManager, General) {
41 { 41 {
42 const int32_t kNumberOfBuffers = 5; 42 const int32_t kNumberOfBuffers = 5;
43 const int32_t kBufferSize = 128; 43 const int32_t kBufferSize = 128;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Test DequeueBuffer() and GetBufferPointer() 176 // Test DequeueBuffer() and GetBufferPointer()
177 for (int32_t i = 0; i < kNumberOfBuffers2; ++i) { 177 for (int32_t i = 0; i < kNumberOfBuffers2; ++i) {
178 EXPECT_EQ(i, manager.DequeueBuffer()); 178 EXPECT_EQ(i, manager.DequeueBuffer());
179 EXPECT_EQ(reinterpret_cast<MediaStreamBuffer*>(memory + i * kBufferSize2), 179 EXPECT_EQ(reinterpret_cast<MediaStreamBuffer*>(memory + i * kBufferSize2),
180 manager.GetBufferPointer(i)); 180 manager.GetBufferPointer(i));
181 } 181 }
182 } 182 }
183 } 183 }
184 184
185 } // namespace ppapi 185 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/dictionary_var.h ('k') | ppapi/shared_impl/ppb_audio_config_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698