Update broken references to image assets
[chromium-blink-merge.git] / mojo / test / test_utils_win.cc
blobe022c9a375592ebbe846ad72f22d5ee66604b2a9
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"
10 namespace mojo {
11 namespace test {
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);
21 } // namespace test
22 } // namespace mojo