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

Side by Side Diff: content/test/ppapi/ppapi_test.cc

Issue 1153063002: Initialize AVFoundation explicitly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ppapi tests Created 5 years, 7 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
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 "content/test/ppapi/ppapi_test.h" 5 #include "content/test/ppapi/ppapi_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
15 #include "content/public/test/ppapi_test_utils.h" 15 #include "content/public/test/ppapi_test_utils.h"
16 #include "content/shell/browser/shell.h" 16 #include "content/shell/browser/shell.h"
17 #include "net/base/filename_util.h" 17 #include "net/base/filename_util.h"
18 #include "ppapi/shared_impl/ppapi_switches.h" 18 #include "ppapi/shared_impl/ppapi_switches.h"
19 19
20 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
21 #include "chromeos/audio/cras_audio_handler.h" 21 #include "chromeos/audio/cras_audio_handler.h"
22 #elif defined(OS_MACOSX)
23 #include "media/base/mac/avfoundation_glue.h"
22 #endif 24 #endif
23 25
24 namespace content { 26 namespace content {
25 27
26 PPAPITestMessageHandler::PPAPITestMessageHandler() { 28 PPAPITestMessageHandler::PPAPITestMessageHandler() {
27 } 29 }
28 30
29 TestMessageHandler::MessageResponse PPAPITestMessageHandler::HandleMessage( 31 TestMessageHandler::MessageResponse PPAPITestMessageHandler::HandleMessage(
30 const std::string& json) { 32 const std::string& json) {
31 std::string trimmed; 33 std::string trimmed;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 117 }
116 118
117 OutOfProcessPPAPITest::OutOfProcessPPAPITest() { 119 OutOfProcessPPAPITest::OutOfProcessPPAPITest() {
118 in_process_ = false; 120 in_process_ = false;
119 } 121 }
120 122
121 void OutOfProcessPPAPITest::SetUp() { 123 void OutOfProcessPPAPITest::SetUp() {
122 #if defined(OS_CHROMEOS) 124 #if defined(OS_CHROMEOS)
123 chromeos::CrasAudioHandler::InitializeForTesting(); 125 chromeos::CrasAudioHandler::InitializeForTesting();
124 #endif 126 #endif
127 #if defined(OS_MACOSX)
128 AVFoundationGlue::InitializeAVFoundation();
jam 2015/05/26 23:13:47 if we had this line in ContentBrowserTest::Setup,
tommi (sloooow) - chröme 2015/05/27 09:11:02 Not sure, I'll investigate. I tried to limit the
129 #endif
125 ContentBrowserTest::SetUp(); 130 ContentBrowserTest::SetUp();
126 } 131 }
127 132
128 void OutOfProcessPPAPITest::TearDown() { 133 void OutOfProcessPPAPITest::TearDown() {
129 ContentBrowserTest::TearDown(); 134 ContentBrowserTest::TearDown();
130 #if defined(OS_CHROMEOS) 135 #if defined(OS_CHROMEOS)
131 chromeos::CrasAudioHandler::Shutdown(); 136 chromeos::CrasAudioHandler::Shutdown();
132 #endif 137 #endif
133 } 138 }
134 139
135 } // namespace content 140 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698