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

Side by Side Diff: content/renderer/blink_platform_audio_hardware_browsertest.cc

Issue 2626023006: Check that render-frame is valid before returning audio params in Blink. (Closed)
Patch Set: Add test Created 3 years, 11 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 | « no previous file | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698