| OLD | NEW |
| 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 "ppapi/shared_impl/media_stream_buffer_manager.h" | 5 #include "ppapi/shared_impl/media_stream_buffer_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include <utility> | 9 #include <utility> |
| 8 | 10 |
| 9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 11 #include "ppapi/c/pp_errors.h" | 13 #include "ppapi/c/pp_errors.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 15 |
| 14 using base::SharedMemory; | 16 using base::SharedMemory; |
| 15 using base::SharedMemoryCreateOptions; | 17 using base::SharedMemoryCreateOptions; |
| 16 | 18 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Test DequeueBuffer() and GetBufferPointer() | 175 // Test DequeueBuffer() and GetBufferPointer() |
| 174 for (int32_t i = 0; i < kNumberOfBuffers2; ++i) { | 176 for (int32_t i = 0; i < kNumberOfBuffers2; ++i) { |
| 175 EXPECT_EQ(i, manager.DequeueBuffer()); | 177 EXPECT_EQ(i, manager.DequeueBuffer()); |
| 176 EXPECT_EQ(reinterpret_cast<MediaStreamBuffer*>(memory + i * kBufferSize2), | 178 EXPECT_EQ(reinterpret_cast<MediaStreamBuffer*>(memory + i * kBufferSize2), |
| 177 manager.GetBufferPointer(i)); | 179 manager.GetBufferPointer(i)); |
| 178 } | 180 } |
| 179 } | 181 } |
| 180 } | 182 } |
| 181 | 183 |
| 182 } // namespace ppapi | 184 } // namespace ppapi |
| OLD | NEW |