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

Unified Diff: content/public/test/render_view_test.cc

Issue 2138613002: Set the font family for the "system-ui" generic font family on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP Created 4 years, 3 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: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index f69db730982c59c12ff6eeda5a032942a4236283..ca81d51fbcdaab20cb5f05732a417e22854a1aad 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -60,6 +60,10 @@
#include "content/test/dwrite_font_fake_sender_win.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "base/path_service.h"
+#endif
+
using blink::WebGestureEvent;
using blink::WebInputEvent;
using blink::WebLocalFrame;
@@ -280,9 +284,18 @@ void RenderViewTest::SetUp() {
// ResourceBundle isn't initialized (since we have to use a diferent test
// suite implementation than for content_unittests). For browser_tests, this
// is already initialized.
- if (!ui::ResourceBundle::HasSharedInstance())
+ if (!ui::ResourceBundle::HasSharedInstance()) {
+#if defined(OS_CHROMEOS)
+ base::FilePath pak_file;
+ bool r = PathService::Get(base::DIR_MODULE, &pak_file);
+ DCHECK(r);
+ pak_file = pak_file.Append(FILE_PATH_LITERAL("content_shell.pak"));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
+#else
ui::ResourceBundle::InitSharedInstanceWithLocale(
"en-US", NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
+#endif
+ }
compositor_deps_.reset(new FakeCompositorDependencies);
mock_process_.reset(new MockRenderProcess);

Powered by Google App Engine
This is Rietveld 408576698