OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome_frame/simple_resource_loader.h" | 5 #include "chrome_frame/simple_resource_loader.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/base/resource/data_pack.h" | 10 #include "ui/base/resource/data_pack.h" |
11 | 11 |
12 TEST(SimpleResourceLoaderTest, LoadLocaleDll) { | 12 TEST(SimpleResourceLoaderTest, LoadLocaleDll) { |
13 std::vector<std::wstring> language_tags; | 13 std::vector<std::wstring> language_tags; |
14 FilePath locales_path; | 14 base::FilePath locales_path; |
15 FilePath file_path; | 15 base::FilePath file_path; |
16 HMODULE dll_handle = NULL; | 16 HMODULE dll_handle = NULL; |
17 | 17 |
18 SimpleResourceLoader::DetermineLocalesDirectory(&locales_path); | 18 SimpleResourceLoader::DetermineLocalesDirectory(&locales_path); |
19 | 19 |
20 // Test valid language-region string: | 20 // Test valid language-region string: |
21 language_tags.clear(); | 21 language_tags.clear(); |
22 language_tags.push_back(L"en-GB"); | 22 language_tags.push_back(L"en-GB"); |
23 language_tags.push_back(L"en"); | 23 language_tags.push_back(L"en"); |
24 ui::DataPack* data_pack = NULL; | 24 ui::DataPack* data_pack = NULL; |
25 | 25 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 EXPECT_EQ(language, L"en-US"); | 79 EXPECT_EQ(language, L"en-US"); |
80 language.clear(); | 80 language.clear(); |
81 } | 81 } |
82 | 82 |
83 TEST(SimpleResourceLoaderTest, InstanceTest) { | 83 TEST(SimpleResourceLoaderTest, InstanceTest) { |
84 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance(); | 84 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance(); |
85 | 85 |
86 ASSERT_TRUE(NULL != loader); | 86 ASSERT_TRUE(NULL != loader); |
87 ASSERT_TRUE(NULL != loader->GetResourceModuleHandle()); | 87 ASSERT_TRUE(NULL != loader->GetResourceModuleHandle()); |
88 } | 88 } |
OLD | NEW |