OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ios/chrome/browser/ui/file_locations.h" | 5 #include "ios/chrome/browser/ui/file_locations.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
11 | 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." |
| 14 #endif |
| 15 |
12 extern std::string GetLocalizedFileName(const std::string& base_name, | 16 extern std::string GetLocalizedFileName(const std::string& base_name, |
13 const std::string& locale, | 17 const std::string& locale, |
14 const std::string& ext); | 18 const std::string& ext); |
15 | 19 |
16 extern std::string GetIOSLocaleMapping(const std::string& locale); | 20 extern std::string GetIOSLocaleMapping(const std::string& locale); |
17 | 21 |
18 namespace { | 22 namespace { |
19 | 23 |
20 class FileLocationsTest : public PlatformTest { | 24 class FileLocationsTest : public PlatformTest { |
21 protected: | 25 protected: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 extension_); | 85 extension_); |
82 if (filename == enFile_ && ![language isEqualToString:@"en"]) { | 86 if (filename == enFile_ && ![language isEqualToString:@"en"]) { |
83 NSLog(@"OK: Locale %@ using language %@ falls back to use English ToS", | 87 NSLog(@"OK: Locale %@ using language %@ falls back to use English ToS", |
84 locale, language); | 88 locale, language); |
85 EXPECT_FALSE([localizedTermsHtml containsObject:language]); | 89 EXPECT_FALSE([localizedTermsHtml containsObject:language]); |
86 } | 90 } |
87 } | 91 } |
88 } | 92 } |
89 | 93 |
90 } // namespace | 94 } // namespace |
OLD | NEW |