OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 | 8 |
7 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
9 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "build/build_config.h" |
10 #include "components/crx_file/id_util.h" | 13 #include "components/crx_file/id_util.h" |
11 #include "extensions/common/constants.h" | 14 #include "extensions/common/constants.h" |
12 #include "extensions/common/extension_paths.h" | 15 #include "extensions/common/extension_paths.h" |
13 #include "extensions/common/extension_resource.h" | 16 #include "extensions/common/extension_resource.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
16 | 19 |
17 namespace extensions { | 20 namespace extensions { |
18 | 21 |
19 TEST(ExtensionResourceTest, CreateEmptyResource) { | 22 TEST(ExtensionResourceTest, CreateEmptyResource) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 ASSERT_FALSE(expected_path.empty()); | 158 ASSERT_FALSE(expected_path.empty()); |
156 | 159 |
157 EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value())); | 160 EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value())); |
158 EXPECT_EQ(ToLower(temp.path().value()), | 161 EXPECT_EQ(ToLower(temp.path().value()), |
159 ToLower(resource.extension_root().value())); | 162 ToLower(resource.extension_root().value())); |
160 EXPECT_EQ(ToLower(base::FilePath().AppendASCII(filename).value()), | 163 EXPECT_EQ(ToLower(base::FilePath().AppendASCII(filename).value()), |
161 ToLower(resource.relative_path().value())); | 164 ToLower(resource.relative_path().value())); |
162 } | 165 } |
163 | 166 |
164 } // namespace extensions | 167 } // namespace extensions |
OLD | NEW |