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

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

Issue 1378353006: Implementation of dwrite font proxy and removal of dwrite font cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More codereview fixes. Jumped the gun on previous patchset. Created 5 years, 1 month 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 | « content/public/common/dwrite_font_platform_win.h ('k') | content/renderer/dwrite_font_proxy_init_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7810e3a760936c1b8e29503dc368663470627bfd..febb2de0b02392115a948e768e6de5894093b4cd 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -49,6 +49,11 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
+#if defined(OS_WIN)
+#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
+#include "content/test/dwrite_font_fake_sender_win.h"
+#endif
+
using blink::WebGestureEvent;
using blink::WebInputEvent;
using blink::WebLocalFrame;
@@ -204,6 +209,15 @@ void RenderViewTest::SetUp() {
SetBrowserClientForTesting(content_browser_client_.get());
SetRendererClientForTesting(content_renderer_client_.get());
+#if defined(OS_WIN)
+ // This needs to happen sometime before PlatformInitialize.
+ // This isn't actually necessary for most tests: most tests are able to
+ // connect to their browser process which runs the real proxy host. However,
+ // some tests route IPCs to MockRenderThread, which is unable to process the
+ // font IPCs, causing all font loading to fail.
+ SetDWriteFontProxySenderForTesting(CreateFakeCollectionSender());
+#endif
+
// Subclasses can set render_thread_ with their own implementation before
// calling RenderViewTest::SetUp().
if (!render_thread_)
« no previous file with comments | « content/public/common/dwrite_font_platform_win.h ('k') | content/renderer/dwrite_font_proxy_init_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698