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

Unified Diff: third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp

Issue 2777903005: Add WebThread in AudioDestination to support AudioWorkletThread (Closed)
Patch Set: Remove callback between Destination and FIFO Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp
diff --git a/third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp b/third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp
index 9351b4281d13b47fbf34e13dc8b9ae9643a9dabb..123e6e2d068ddc8e67b33751d129719ee82351da 100644
--- a/third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp
+++ b/third_party/WebKit/Source/platform/audio/PushPullFIFOTest.cpp
@@ -8,6 +8,8 @@
#include <vector>
#include "platform/audio/AudioUtilities.h"
#include "platform/testing/TestingPlatformSupport.h"
+#include "platform/wtf/Functional.h"
+#include "platform/heap/Persistent.h"
#include "platform/wtf/PtrUtil.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -30,22 +32,22 @@ TEST(PushPullFIFOBasicTest, BasicTests) {
// The input bus length must be |AudioUtilities::kRenderQuantumFrames|.
// i.e.) inputBus->length() == kRenderQuantumFrames
- RefPtr<AudioBus> input_bus_of129_frames =
+ RefPtr<AudioBus> input_bus_129_frames =
AudioBus::Create(2, AudioUtilities::kRenderQuantumFrames + 1);
- EXPECT_DEATH(test_fifo->Push(input_bus_of129_frames.Get()), "");
- RefPtr<AudioBus> input_bus_of127_frames =
+ EXPECT_DEATH(test_fifo->Push(input_bus_129_frames.Get()), "");
+ RefPtr<AudioBus> input_bus_127_frames =
AudioBus::Create(2, AudioUtilities::kRenderQuantumFrames - 1);
- EXPECT_DEATH(test_fifo->Push(input_bus_of127_frames.Get()), "");
+ EXPECT_DEATH(test_fifo->Push(input_bus_127_frames.Get()), "");
// Pull request frames cannot exceed the length of output bus.
// i.e.) framesRequested <= outputBus->length()
- RefPtr<AudioBus> output_bus_of512_frames = AudioBus::Create(2, 512);
- EXPECT_DEATH(test_fifo->Pull(output_bus_of512_frames.Get(), 513), "");
+ RefPtr<AudioBus> output_bus_512_frames = AudioBus::Create(2, 512);
+ EXPECT_DEATH(test_fifo->Pull(output_bus_512_frames.Get(), 513), "");
// Pull request frames cannot exceed the length of FIFO.
// i.e.) framesRequested <= m_fifoLength
- RefPtr<AudioBus> output_bus_of1025_frames = AudioBus::Create(2, 1025);
- EXPECT_DEATH(test_fifo->Pull(output_bus_of1025_frames.Get(), 1025), "");
+ RefPtr<AudioBus> output_bus_1025_frames = AudioBus::Create(2, 1025);
+ EXPECT_DEATH(test_fifo->Pull(output_bus_1025_frames.Get(), 1025), "");
}
// Fills each AudioChannel in an AudioBus with a series of linearly increasing
@@ -169,7 +171,8 @@ TEST_P(PushPullFIFOFeatureTest, FeatureTests) {
// Verify in-FIFO samples.
for (const auto& sample : expected_state.fifo_samples) {
- EXPECT_TRUE(VerifyBusValueAtIndex(fifo->Bus(), sample.index, sample.value));
+ EXPECT_TRUE(VerifyBusValueAtIndex(fifo->GetFIFOBusForTest(),
+ sample.index, sample.value));
}
// Verify samples from the most recent output bus.

Powered by Google App Engine
This is Rietveld 408576698