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

Side by Side Diff: content/shell/renderer/layout_test/layout_test_render_process_observer.cc

Issue 1394003004: Add flag to force complex text for tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/shell/renderer/layout_test/layout_test_render_process_observer .h" 5 #include "content/shell/renderer/layout_test/layout_test_render_process_observer .h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/test_runner/web_test_interfaces.h" 8 #include "components/test_runner/web_test_interfaces.h"
9 #include "content/public/common/content_client.h" 9 #include "content/public/common/content_client.h"
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 switches::kStableReleaseMode)) { 68 switches::kStableReleaseMode)) {
69 WebRuntimeFeatures::enableTestOnlyFeatures(true); 69 WebRuntimeFeatures::enableTestOnlyFeatures(true);
70 } 70 }
71 71
72 test_interfaces_.reset(new test_runner::WebTestInterfaces); 72 test_interfaces_.reset(new test_runner::WebTestInterfaces);
73 test_interfaces_->ResetAll(); 73 test_interfaces_->ResetAll();
74 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 74 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
75 switches::kEnableFontAntialiasing)) { 75 switches::kEnableFontAntialiasing)) {
76 blink::setFontAntialiasingEnabledForTest(true); 76 blink::setFontAntialiasingEnabledForTest(true);
77 } 77 }
78 78 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
79 switches::kAlwaysUseComplexText)) {
80 blink::setAlwaysUseComplexTextForTest(true);
81 }
79 } 82 }
80 83
81 void LayoutTestRenderProcessObserver::OnRenderProcessShutdown() { 84 void LayoutTestRenderProcessObserver::OnRenderProcessShutdown() {
82 test_interfaces_.reset(); 85 test_interfaces_.reset();
83 } 86 }
84 87
85 bool LayoutTestRenderProcessObserver::OnControlMessageReceived( 88 bool LayoutTestRenderProcessObserver::OnControlMessageReceived(
86 const IPC::Message& message) { 89 const IPC::Message& message) {
87 bool handled = true; 90 bool handled = true;
88 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderProcessObserver, message) 91 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderProcessObserver, message)
89 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) 92 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir)
90 IPC_MESSAGE_UNHANDLED(handled = false) 93 IPC_MESSAGE_UNHANDLED(handled = false)
91 IPC_END_MESSAGE_MAP() 94 IPC_END_MESSAGE_MAP()
92 95
93 return handled; 96 return handled;
94 } 97 }
95 98
96 void LayoutTestRenderProcessObserver::OnSetWebKitSourceDir( 99 void LayoutTestRenderProcessObserver::OnSetWebKitSourceDir(
97 const base::FilePath& webkit_source_dir) { 100 const base::FilePath& webkit_source_dir) {
98 webkit_source_dir_ = webkit_source_dir; 101 webkit_source_dir_ = webkit_source_dir;
99 } 102 }
100 103
101 } // namespace content 104 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/common/shell_switches.cc ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698