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

Unified Diff: chromecast/media/cma/base/run_all_unittests.cc

Issue 509213002: Add a buffering controller for Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad license header. Created 6 years, 4 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 | « chromecast/media/cma/base/cma_logging.h ('k') | chromecast/media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/base/run_all_unittests.cc
diff --git a/chromecast/media/cma/base/run_all_unittests.cc b/chromecast/media/cma/base/run_all_unittests.cc
new file mode 100644
index 0000000000000000000000000000000000000000..07b9e2bfb82db876b312957dd566b630ae623abd
--- /dev/null
+++ b/chromecast/media/cma/base/run_all_unittests.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/bind.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_suite.h"
+#include "build/build_config.h"
+#include "media/base/media.h"
+
+#if defined(OS_ANDROID)
+#error "CMA not supported on Android"
+#endif
+
+class CmaTestSuite : public base::TestSuite {
+ public:
+ // Note: the base class constructor creates an AtExitManager.
+ CmaTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
+ virtual ~CmaTestSuite() {}
+
+ protected:
+ virtual void Initialize() OVERRIDE;
+};
+
+void CmaTestSuite::Initialize() {
+ // Run TestSuite::Initialize first so that logging is initialized.
+ base::TestSuite::Initialize();
+
+ // Initialize the FFMpeg library.
+ // Note: at this time, AtExitManager is already present.
+ media::InitializeMediaLibraryForTesting();
+}
+
+int main(int argc, char** argv) {
+ CmaTestSuite test_suite(argc, argv);
+
+ return base::LaunchUnitTests(
+ argc, argv, base::Bind(&CmaTestSuite::Run,
+ base::Unretained(&test_suite)));
+}
« no previous file with comments | « chromecast/media/cma/base/cma_logging.h ('k') | chromecast/media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698