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

Unified Diff: media/mojo/services/media_service_unittest.cc

Issue 2882813002: media: Convert mojo media defines to buildflags (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mojo/services/interface_factory_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_service_unittest.cc
diff --git a/media/mojo/services/media_service_unittest.cc b/media/mojo/services/media_service_unittest.cc
index ff05705e3f7b84d4c363cc42f4ec34f85e70292f..a4cdebf171020a32aebeaac135e2114dc11d3783 100644
--- a/media/mojo/services/media_service_unittest.cc
+++ b/media/mojo/services/media_service_unittest.cc
@@ -17,6 +17,7 @@
#include "media/base/test_helpers.h"
#include "media/mojo/clients/mojo_demuxer_stream_impl.h"
#include "media/mojo/common/media_type_converters.h"
+#include "media/mojo/features.h"
#include "media/mojo/interfaces/content_decryption_module.mojom.h"
#include "media/mojo/interfaces/decryptor.mojom.h"
#include "media/mojo/interfaces/interface_factory.mojom.h"
@@ -36,7 +37,7 @@ using testing::StrictMock;
namespace media {
namespace {
-#if defined(ENABLE_MOJO_CDM)
+#if BUILDFLAG(ENABLE_MOJO_CDM)
const char kClearKeyKeySystem[] = "org.w3.clearkey";
const char kInvalidKeySystem[] = "invalid.key.system";
#endif
@@ -163,7 +164,7 @@ class MediaServiceTest : public service_manager::test::ServiceTest {
// Note: base::RunLoop::RunUntilIdle() does not work well in these tests because
// even when the loop is idle, we may still have pending events in the pipe.
-#if defined(ENABLE_MOJO_CDM)
+#if BUILDFLAG(ENABLE_MOJO_CDM)
TEST_F(MediaServiceTest, InitializeCdm_Success) {
InitializeCdm(kClearKeyKeySystem, true, 1);
run_loop_->Run();
@@ -173,9 +174,9 @@ TEST_F(MediaServiceTest, InitializeCdm_InvalidKeySystem) {
InitializeCdm(kInvalidKeySystem, false, 0);
run_loop_->Run();
}
-#endif // defined(ENABLE_MOJO_CDM)
+#endif // BUILDFLAG(ENABLE_MOJO_CDM)
-#if defined(ENABLE_MOJO_RENDERER)
+#if BUILDFLAG(ENABLE_MOJO_RENDERER)
// Sometimes fails on Linux. http://crbug.com/594977
#if defined(OS_LINUX)
#define MAYBE_InitializeRenderer_Success DISABLED_InitializeRenderer_Success
@@ -192,7 +193,7 @@ TEST_F(MediaServiceTest, InitializeRenderer_InvalidConfig) {
InitializeRenderer(TestVideoConfig::Invalid(), false);
run_loop_->Run();
}
-#endif // defined(ENABLE_MOJO_RENDERER)
+#endif // BUILDFLAG(ENABLE_MOJO_RENDERER)
TEST_F(MediaServiceTest, Lifetime) {
// The lifetime of the media service is controlled by the number of
« no previous file with comments | « media/mojo/services/interface_factory_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698