Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: trunk/src/ui/base/l10n/time_format_unittest.cc

Issue 190133003: Revert 255512 "Introduce a mock ui_unittests Framework for loadi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | trunk/src/ui/base/strings/ui_strings.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/base/l10n/time_format_unittest.cc
===================================================================
--- trunk/src/ui/base/l10n/time_format_unittest.cc (revision 255525)
+++ trunk/src/ui/base/l10n/time_format_unittest.cc (working copy)
@@ -74,6 +74,15 @@
{}
protected:
+ static void SetUpTestCase() {
+ LoadLocale(ui::ResourceBundle::GetSharedInstance()
+ .GetLocaleFilePath("en-US", true));
+ }
+
+ static void TearDownTestCase() {
+ LoadLocale(base::FilePath());
+ }
+
void TestStrings() {
// Test English strings (simple, singular).
EXPECT_EQ(ASCIIToUTF16("1 sec"), TimeFormat::Simple(
@@ -220,6 +229,12 @@
TimeDelta delta_1d12h_;
TimeDelta delta_2d_;
TimeDelta delta_2d1h_;
+
+ private:
+ static void LoadLocale(const base::FilePath& file_path) {
+ ui::ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(file_path);
+ ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources("en-US");
+ }
};
TEST_F(TimeFormatTest, SimpleAndDetailedRounding) {
« no previous file with comments | « no previous file | trunk/src/ui/base/strings/ui_strings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698