Revert of EasyUnlock: Work around the ghost overlay from CSS animation. (patchset...
[chromium-blink-merge.git] / ppapi / shared_impl / test_harness_utils.cc
blob93ba755c958d6af6a0b47d12b58c5f0e9e3ff5b8
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
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/test_harness_utils.h"
7 #include <string>
8 #include "base/macros.h"
10 namespace ppapi {
12 std::string StripTestPrefixes(const std::string& test_name) {
13 const char* const kTestPrefixes[] = {
14 "FAILS_", "FLAKY_", "DISABLED_", "SLOW_" };
15 for (size_t i = 0; i < arraysize(kTestPrefixes); ++i)
16 if (test_name.find(kTestPrefixes[i]) == 0)
17 return test_name.substr(strlen(kTestPrefixes[i]));
18 return test_name;
21 base::FilePath::StringType GetTestLibraryName() {
22 #if defined(OS_WIN)
23 return L"ppapi_tests.dll";
24 #elif defined(OS_MACOSX)
25 return "ppapi_tests.plugin";
26 #elif defined(OS_POSIX)
27 return "libppapi_tests.so";
28 #endif
31 } // namespace ppapi