1 // Copyright 2015 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 "mojo/test/test_utils.h"
7 #include "base/base_paths.h"
8 #include "base/path_service.h"
9 #include "base/strings/string_util.h"
13 base::FilePath
GetFilePathForJSResource(const std::string
& path
) {
14 std::string binding_path
= "gen/" + path
+ ".js";
15 base::ReplaceChars(binding_path
, "//", "\\", &binding_path
);
16 base::FilePath exe_dir
;
17 PathService::Get(base::DIR_EXE
, &exe_dir
);
18 return exe_dir
.AppendASCII(binding_path
);