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

Unified Diff: ios/web/test/web_test_suite.mm

Issue 2028013003: [ios Mojo] Integration test for Mojo WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 7 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 | « ios/web/test/test_resources.grd ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/test/web_test_suite.mm
diff --git a/ios/web/test/web_test_suite.mm b/ios/web/test/web_test_suite.mm
index e167e98f9ef66916f9ec61b90b4f983bfc4c514c..eb6f444e4a13c9b5474ab5ee42dbc1c87d12ab91 100644
--- a/ios/web/test/web_test_suite.mm
+++ b/ios/web/test/web_test_suite.mm
@@ -7,10 +7,12 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/statistics_recorder.h"
+#include "base/path_service.h"
#import "ios/web/public/test/test_web_client.h"
#include "ios/web/public/url_schemes.h"
#include "ios/web/web_thread_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/resource/resource_bundle.h"
namespace web {
@@ -43,6 +45,17 @@ void WebTestSuite::Initialize() {
new WebTestSuiteListener);
RegisterWebSchemes(false);
+
+ // Force unittests to run using en-US so if testing string output will work
+ // regardless of the system language.
+ ui::ResourceBundle::InitSharedInstanceWithLocale(
+ "en-US", nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
+ base::FilePath resources_pack_path;
+ base::PathService::Get(base::DIR_MODULE, &resources_pack_path);
+ resources_pack_path =
+ resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
+ ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ resources_pack_path, ui::SCALE_FACTOR_NONE);
}
} // namespace web
« no previous file with comments | « ios/web/test/test_resources.grd ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698