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

Side by Side Diff: content/test/layouttest_support.cc

Issue 1821413003: Remove logic for lazy initialization of WebKit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 FrameProxy* render_frame_proxy = new FrameProxy(params); 91 FrameProxy* render_frame_proxy = new FrameProxy(params);
92 render_frame_proxy->set_base_proxy(GetWebTestProxyBase(params.render_view)); 92 render_frame_proxy->set_base_proxy(GetWebTestProxyBase(params.render_view));
93 93
94 return render_frame_proxy; 94 return render_frame_proxy;
95 } 95 }
96 96
97 #if defined(OS_WIN) 97 #if defined(OS_WIN)
98 // DirectWrite only has access to %WINDIR%\Fonts by default. For developer 98 // DirectWrite only has access to %WINDIR%\Fonts by default. For developer
99 // side-loading, support kRegisterFontFiles to allow access to additional fonts. 99 // side-loading, support kRegisterFontFiles to allow access to additional fonts.
100 void RegisterSideloadedTypefaces(SkFontMgr* fontmgr) { 100 void RegisterSideloadedTypefaces(SkFontMgr* fontmgr) {
101 RenderThreadImpl::current()->EnsureWebKitInitialized();
102 std::vector<std::string> files = switches::GetSideloadFontFiles(); 101 std::vector<std::string> files = switches::GetSideloadFontFiles();
103 for (std::vector<std::string>::const_iterator i(files.begin()); 102 for (std::vector<std::string>::const_iterator i(files.begin());
104 i != files.end(); 103 i != files.end();
105 ++i) { 104 ++i) {
106 SkTypeface* typeface = fontmgr->createFromFile(i->c_str()); 105 SkTypeface* typeface = fontmgr->createFromFile(i->c_str());
107 if (!ShouldUseDirectWriteFontProxyFieldTrial()) 106 if (!ShouldUseDirectWriteFontProxyFieldTrial())
108 DoPreSandboxWarmupForTypeface(typeface); 107 DoPreSandboxWarmupForTypeface(typeface);
109 blink::WebFontRendering::addSideloadedFontForTesting(typeface); 108 blink::WebFontRendering::addSideloadedFontForTesting(typeface);
110 } 109 }
111 } 110 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 result.append( 450 result.append(
452 DumpHistoryItem(entry->root_history_node(), 451 DumpHistoryItem(entry->root_history_node(),
453 8, 452 8,
454 index == current_index)); 453 index == current_index));
455 } 454 }
456 result.append("===============================================\n"); 455 result.append("===============================================\n");
457 return result; 456 return result;
458 } 457 }
459 458
460 } // namespace content 459 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698