test_with_locale_and_resources.cc 758 B

1234567891011121314151617181920212223
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ios/web_view/test/test_with_locale_and_resources.h"
  5. #include "ui/base/l10n/l10n_util_mac.h"
  6. #include "ui/base/resource/resource_bundle.h"
  7. namespace ios_web_view {
  8. TestWithLocaleAndResources::TestWithLocaleAndResources() {
  9. l10n_util::OverrideLocaleWithCocoaLocale();
  10. ui::ResourceBundle::InitSharedInstanceWithLocale(
  11. l10n_util::GetLocaleOverride(), /*delegate=*/nullptr,
  12. ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
  13. }
  14. TestWithLocaleAndResources::~TestWithLocaleAndResources() {
  15. ui::ResourceBundle::CleanupSharedInstance();
  16. }
  17. } // namespace ios_web_view