diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 14:29:44 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 14:29:44 +0000 |
commit | e14fff7f803688dea1aea0c96fae7fe1c507dd4d (patch) | |
tree | ce73556c134671cb2e1e10adcb41697c181d721c /chrome_frame/test/simple_resource_loader_test.cc | |
parent | fc98920033d04a91f943dcfef032846072cdd4dc (diff) | |
download | chromium_src-e14fff7f803688dea1aea0c96fae7fe1c507dd4d.zip chromium_src-e14fff7f803688dea1aea0c96fae7fe1c507dd4d.tar.gz chromium_src-e14fff7f803688dea1aea0c96fae7fe1c507dd4d.tar.bz2 |
Correct problem with localized resource loading in Chrome Frame: we were not loading language DLLs that did not have a region specifier.
BUG=56432
TEST=Chrome Frame loads correctly in non-region specific languages, e.g. French.
Review URL: http://codereview.chromium.org/3439020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/simple_resource_loader_test.cc')
-rw-r--r-- | chrome_frame/test/simple_resource_loader_test.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome_frame/test/simple_resource_loader_test.cc b/chrome_frame/test/simple_resource_loader_test.cc new file mode 100644 index 0000000..f67ef49 --- /dev/null +++ b/chrome_frame/test/simple_resource_loader_test.cc @@ -0,0 +1,25 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome_frame/simple_resource_loader.h" + +#include "base/file_path.h" +#include "testing/gtest/include/gtest/gtest.h" + +TEST(SimpleResourceLoaderTest, GetLocaleFilePath) { + SimpleResourceLoader loader; + + FilePath file_path; + // Test valid language-region string: + EXPECT_TRUE(loader.GetLocaleFilePath(L"en", L"GB", &file_path)); + EXPECT_TRUE(file_path.BaseName() == FilePath(L"en-GB.dll")); + + // Test valid language-region string for which we only have a language dll: + EXPECT_TRUE(loader.GetLocaleFilePath(L"fr", L"FR", &file_path)); + EXPECT_TRUE(file_path.BaseName() == FilePath(L"fr.dll")); + + // Test invalid language-region string, make sure defaults to en-US.dll: + EXPECT_TRUE(loader.GetLocaleFilePath(L"xx", L"XX", &file_path)); + EXPECT_TRUE(file_path.BaseName() == FilePath(L"en-US.dll")); +} |