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

Side by Side Diff: chrome/app/resources/resources_unittest.cc

Issue 1878943002: Revert of Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 11
12 #include "chrome/grit/chromium_strings.h" 12 #include "chrome/grit/chromium_strings.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/material_design/material_design_controller.h"
17 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/base/ui_base_paths.h" 17 #include "ui/base/ui_base_paths.h"
19 18
20 class ResourcesTest : public ::testing::Test { 19 class ResourcesTest : public ::testing::Test {
21 protected: 20 protected:
22 ResourcesTest() { 21 ResourcesTest() {
23 ui::RegisterPathProvider(); 22 ui::RegisterPathProvider();
24 ui::MaterialDesignController::Initialize();
25 ResourceBundle::InitSharedInstanceWithLocale( 23 ResourceBundle::InitSharedInstanceWithLocale(
26 "en-US", nullptr, ResourceBundle::LOAD_COMMON_RESOURCES); 24 "en-US", nullptr, ResourceBundle::LOAD_COMMON_RESOURCES);
27 } 25 }
28 26
29 ~ResourcesTest() override { ResourceBundle::CleanupSharedInstance(); } 27 ~ResourcesTest() override { ResourceBundle::CleanupSharedInstance(); }
30 }; 28 };
31 29
32 // Trailing whitespace has been the cause of a bug in the past. Make sure this 30 // Trailing whitespace has been the cause of a bug in the past. Make sure this
33 // never happens again on messages where this matter. 31 // never happens again on messages where this matter.
34 TEST_F(ResourcesTest, CriticalMessagesContainNoExtraWhitespaces) { 32 TEST_F(ResourcesTest, CriticalMessagesContainNoExtraWhitespaces) {
(...skipping 13 matching lines...) Expand all
48 ResourceBundle::GetSharedInstance().OverrideLocalePakForTest( 46 ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(
49 locale_file_path); 47 locale_file_path);
50 ResourceBundle::GetSharedInstance().ReloadLocaleResources(""); 48 ResourceBundle::GetSharedInstance().ReloadLocaleResources("");
51 49
52 for (int message : messages_to_check) { 50 for (int message : messages_to_check) {
53 base::string16 message_str = l10n_util::GetStringUTF16(message); 51 base::string16 message_str = l10n_util::GetStringUTF16(message);
54 EXPECT_EQ(message_str, base::TrimWhitespace(message_str, base::TRIM_ALL)); 52 EXPECT_EQ(message_str, base::TrimWhitespace(message_str, base::TRIM_ALL));
55 } 53 }
56 } 54 }
57 } 55 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698