const char kAllowRAInDevMode[] = "allow-ra-in-dev-mode";
#endif // BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_TIZEN_TV)
+const char kTestDataDirPrefix[] = "test-data-dir-prefix";
+#endif // BUILDFLAG(IS_TIZEN_TV)
+
namespace autoplay {
// Autoplay policy that requires a document user activation.
MEDIA_EXPORT extern const char kAllowRAInDevMode[];
#endif // BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_TIZEN_TV)
+MEDIA_EXPORT extern const char kTestDataDirPrefix[];
+#endif // BUILDFLAG(IS_TIZEN_TV)
+
namespace autoplay {
MEDIA_EXPORT extern const char kDocumentUserActivationRequiredPolicy[];
#include <ostream>
#include "base/check_op.h"
+#include "base/command_line.h"
#include "base/containers/flat_map.h"
#include "base/files/file_util.h"
#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
#include "media/base/decoder_buffer.h"
+#include "media/base/media_switches.h"
namespace media {
base::FilePath GetTestDataFilePath(const std::string& name) {
base::FilePath file_path;
+#if BUILDFLAG(IS_TIZEN_TV)
+ auto command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kTestDataDirPrefix)) {
+ file_path = command_line->GetSwitchValuePath(switches::kTestDataDirPrefix);
+ } else {
+ CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &file_path));
+ }
+ return file_path.Append(GetTestDataPath()).AppendASCII(name);
+#else
CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &file_path));
return file_path.Append(GetTestDataPath()).AppendASCII(name);
+#endif // BUILDFLAG(IS_TIZEN_TV)
}
base::FilePath GetTestDataPath() {