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

Side by Side Diff: ui/views/view_unittest.cc

Issue 1464503002: Fix resource-related issues in views_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make views_unittests independent from locale pak files Created 5 years 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <map> 5 #include <map>
6 6
7 #include "base/i18n/rtl.h"
7 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
8 #include "base/rand_util.h" 9 #include "base/rand_util.h"
9 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
11 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
12 #include "cc/playback/display_item_list.h" 13 #include "cc/playback/display_item_list.h"
13 #include "cc/playback/display_item_list_settings.h" 14 #include "cc/playback/display_item_list_settings.h"
14 #include "ui/base/accelerators/accelerator.h" 15 #include "ui/base/accelerators/accelerator.h"
15 #include "ui/base/clipboard/clipboard.h" 16 #include "ui/base/clipboard/clipboard.h"
16 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if (!view->layer() && base::RandDouble() < 0.1) 176 if (!view->layer() && base::RandDouble() < 0.1)
176 view->SetPaintToLayer(true); 177 view->SetPaintToLayer(true);
177 178
178 if (base::RandDouble() < 0.1) 179 if (base::RandDouble() < 0.1)
179 view->SetVisible(!view->visible()); 180 view->SetVisible(!view->visible());
180 } 181 }
181 182
182 class ScopedRTL { 183 class ScopedRTL {
183 public: 184 public:
184 ScopedRTL() { 185 ScopedRTL() {
185 locale_ = l10n_util::GetApplicationLocale(std::string()); 186 locale_ = base::i18n::GetConfiguredLocale();
186 base::i18n::SetICUDefaultLocale("he"); 187 base::i18n::SetICUDefaultLocale("he");
187 } 188 }
188 ~ScopedRTL() { base::i18n::SetICUDefaultLocale(locale_); } 189 ~ScopedRTL() { base::i18n::SetICUDefaultLocale(locale_); }
189 190
190 private: 191 private:
191 std::string locale_; 192 std::string locale_;
192 }; 193 };
193 194
194 } // namespace 195 } // namespace
195 196
(...skipping 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 // notification. 4291 // notification.
4291 TestView* test_view_child_2 = new TestView(); 4292 TestView* test_view_child_2 = new TestView();
4292 test_view->AddChildView(test_view_child_2); 4293 test_view->AddChildView(test_view_child_2);
4293 EXPECT_TRUE(test_view_child_2->native_theme_); 4294 EXPECT_TRUE(test_view_child_2->native_theme_);
4294 EXPECT_EQ(widget->GetNativeTheme(), test_view_child_2->native_theme_); 4295 EXPECT_EQ(widget->GetNativeTheme(), test_view_child_2->native_theme_);
4295 4296
4296 widget->CloseNow(); 4297 widget->CloseNow();
4297 } 4298 }
4298 4299
4299 } // namespace views 4300 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698