summaryrefslogtreecommitdiffstats
path: root/mojo/test/test_utils_posix.cc
blob: 5ac356f6501e2e86dc4917dc6d947353dac53fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2015 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/test/test_utils.h"

#include "base/base_paths.h"
#include "base/path_service.h"

namespace mojo {
namespace test {

base::FilePath GetFilePathForJSResource(const std::string& path) {
  std::string binding_path = "gen/" + path + ".js";
  base::FilePath exe_dir;
  PathService::Get(base::DIR_EXE, &exe_dir);
  return exe_dir.AppendASCII(binding_path);
}

}  // namespace test
}  // namespace mojo