OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 l10n_path = l10n_path.AppendASCII(current_locale); | 60 l10n_path = l10n_path.AppendASCII(current_locale); |
61 ASSERT_TRUE(file_util::CreateDirectory(l10n_path)); | 61 ASSERT_TRUE(file_util::CreateDirectory(l10n_path)); |
62 | 62 |
63 ASSERT_TRUE(file_util::WriteFile(l10n_path.AppendASCII(filename), | 63 ASSERT_TRUE(file_util::WriteFile(l10n_path.AppendASCII(filename), |
64 data.c_str(), data.length())); | 64 data.c_str(), data.length())); |
65 | 65 |
66 FilePath path; | 66 FilePath path; |
67 ExtensionResource resource(temp.path(), FilePath().AppendASCII(filename)); | 67 ExtensionResource resource(temp.path(), FilePath().AppendASCII(filename)); |
68 FilePath resolved_path = resource.GetFilePath(); | 68 FilePath resolved_path = resource.GetFilePath(); |
69 | 69 |
70 EXPECT_EQ(l10n_path.AppendASCII(filename).value(), resolved_path.value()); | 70 EXPECT_EQ(ToLower(l10n_path.AppendASCII(filename).value()), |
71 EXPECT_EQ(temp.path().value(), resource.extension_root().value()); | 71 ToLower(resolved_path.value())); |
72 EXPECT_EQ(FilePath().AppendASCII(filename).value(), | 72 EXPECT_EQ(ToLower(temp.path().value()), |
73 resource.relative_path().value()); | 73 ToLower(resource.extension_root().value())); |
| 74 EXPECT_EQ(ToLower(FilePath().AppendASCII(filename).value()), |
| 75 ToLower(resource.relative_path().value())); |
74 } | 76 } |
OLD | NEW |