summaryrefslogtreecommitdiffstats
path: root/chromium/mojo/public/cpp/test_support/lib/test_support.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/mojo/public/cpp/test_support/lib/test_support.cc')
-rw-r--r--chromium/mojo/public/cpp/test_support/lib/test_support.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/chromium/mojo/public/cpp/test_support/lib/test_support.cc b/chromium/mojo/public/cpp/test_support/lib/test_support.cc
new file mode 100644
index 00000000000..55a3dcc7024
--- /dev/null
+++ b/chromium/mojo/public/cpp/test_support/lib/test_support.cc
@@ -0,0 +1,26 @@
+// 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 "mojo/public/cpp/test_support/test_support.h"
+
+#include <stdlib.h>
+
+namespace mojo {
+namespace test {
+
+std::vector<std::string> EnumerateSourceRootRelativeDirectory(
+ const std::string& relative_path) {
+ char** names = MojoTestSupportEnumerateSourceRootRelativeDirectory(
+ relative_path.c_str());
+ std::vector<std::string> results;
+ for (char** ptr = names; *ptr != NULL; ++ptr) {
+ results.push_back(*ptr);
+ free(*ptr);
+ }
+ free(names);
+ return results;
+}
+
+} // namespace test
+} // namespace mojo