| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/resource_provider/file_utils.h" | 5 #include "components/resource_provider/file_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/macros.h" |
| 8 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 9 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 12 | 15 |
| 13 namespace resource_provider { | 16 namespace resource_provider { |
| 14 | 17 |
| 15 // Assertions for invalid app paths. | 18 // Assertions for invalid app paths. |
| 16 TEST(FileUtilsTest, InvalidAppPath) { | 19 TEST(FileUtilsTest, InvalidAppPath) { |
| 17 struct TestCase { | 20 struct TestCase { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 GetPathForResourceNamed(app_path, "single")); | 74 GetPathForResourceNamed(app_path, "single")); |
| 72 EXPECT_EQ(app_path.AppendASCII("single").value(), trivial_path.value()); | 75 EXPECT_EQ(app_path.AppendASCII("single").value(), trivial_path.value()); |
| 73 | 76 |
| 74 // Two path elements. | 77 // Two path elements. |
| 75 const base::FilePath two_paths(GetPathForResourceNamed(app_path, "a/b")); | 78 const base::FilePath two_paths(GetPathForResourceNamed(app_path, "a/b")); |
| 76 EXPECT_EQ(app_path.AppendASCII("a").AppendASCII("b").value(), | 79 EXPECT_EQ(app_path.AppendASCII("a").AppendASCII("b").value(), |
| 77 two_paths.value()); | 80 two_paths.value()); |
| 78 } | 81 } |
| 79 | 82 |
| 80 } // namespace resource_provider | 83 } // namespace resource_provider |
| OLD | NEW |