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

Unified Diff: base/i18n/rtl_unittest.cc

Issue 1162603004: Restore locales after tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing file Created 5 years, 4 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
Index: base/i18n/rtl_unittest.cc
diff --git a/base/i18n/rtl_unittest.cc b/base/i18n/rtl_unittest.cc
index ddaff1e4372026b44cff21ac00906fcb8fc19db3..80f37719e30cb30cbd4932e6737f5c060554cf10 100644
--- a/base/i18n/rtl_unittest.cc
+++ b/base/i18n/rtl_unittest.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/files/file_path.h"
+#include "base/i18n/icu_test_util.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -305,6 +306,7 @@ TEST_F(RTLTest, WrapString) {
const bool was_rtl = IsRTL();
+ ScopedSetICUDefaultLocale restore_object(uloc_getDefault());
for (size_t i = 0; i < 2; ++i) {
// Toggle the application default text direction (to try each direction).
SetRTL(!IsRTL());
@@ -352,6 +354,7 @@ TEST_F(RTLTest, GetDisplayStringInLTRDirectionality) {
const bool was_rtl = IsRTL();
+ ScopedSetICUDefaultLocale restore_object(uloc_getDefault());
for (size_t i = 0; i < 2; ++i) {
// Toggle the application default text direction (to try each direction).
SetRTL(!IsRTL());
@@ -438,6 +441,7 @@ TEST_F(RTLTest, UnadjustStringForLocaleDirection) {
const bool was_rtl = IsRTL();
+ ScopedSetICUDefaultLocale restore_object(uloc_getDefault());
for (size_t i = 0; i < 2; ++i) {
// Toggle the application default text direction (to try each direction).
SetRTL(!IsRTL());

Powered by Google App Engine
This is Rietveld 408576698