| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/test/render_view_test.h" |
| 6 #include "third_party/WebKit/public/platform/Platform.h" |
| 7 |
| 8 namespace content { |
| 9 |
| 10 class BlinkPlatformAudioHardwareTest : public RenderViewTest { |
| 11 protected: |
| 12 void SetUp() override { RenderViewTest::SetUp(); } |
| 13 }; |
| 14 |
| 15 // Test that calling audioHardware functions from blink::Platform without a v8 |
| 16 // context returns valid values. |
| 17 TEST_F(BlinkPlatformAudioHardwareTest, AudioHardwareFunctionsNoV8) { |
| 18 blink::Platform* blink_platform = blink::Platform::current(); |
| 19 size_t buffer_size = blink_platform->audioHardwareBufferSize(); |
| 20 EXPECT_GT(buffer_size, 0u); |
| 21 unsigned channels = blink_platform->audioHardwareOutputChannels(); |
| 22 EXPECT_GT(channels, 0u); |
| 23 double sample_rate = blink_platform->audioHardwareSampleRate(); |
| 24 EXPECT_GT(sample_rate, 0.0); |
| 25 } |
| 26 |
| 27 } // namespace content |
| OLD | NEW |