OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test_runner/TestInterfaces.h" | 5 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 TestInterfaces::TestInterfaces() | 32 TestInterfaces::TestInterfaces() |
33 : m_accessibilityController(new content::AccessibilityController()) | 33 : m_accessibilityController(new content::AccessibilityController()) |
34 , m_eventSender(new content::EventSender(this)) | 34 , m_eventSender(new content::EventSender(this)) |
35 , m_gamepadController(new content::GamepadController()) | 35 , m_gamepadController(new content::GamepadController()) |
36 , m_textInputController(new content::TextInputController()) | 36 , m_textInputController(new content::TextInputController()) |
37 , m_testRunner(new content::TestRunner(this)) | 37 , m_testRunner(new content::TestRunner(this)) |
38 , m_delegate(0) | 38 , m_delegate(0) |
39 { | 39 { |
40 blink::setLayoutTestMode(true); | 40 blink::setLayoutTestMode(true); |
41 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableFontSmoothi
ng)) | 41 |
42 blink::setFontSmoothingEnabledForTest(true); | 42 // FIXME(dro) crbug.com/367082: Remove the smoothing parameter once the rena
me is complete |
| 43 // on the Blink side. |
| 44 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableFontAntiali
asing) || |
| 45 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableFontSmoothi
ng)) |
| 46 blink::setFontAntialiasingEnabledForTest(true); |
43 | 47 |
44 // NOTE: please don't put feature specific enable flags here, | 48 // NOTE: please don't put feature specific enable flags here, |
45 // instead add them to RuntimeEnabledFeatures.in | 49 // instead add them to RuntimeEnabledFeatures.in |
46 | 50 |
47 resetAll(); | 51 resetAll(); |
48 } | 52 } |
49 | 53 |
50 TestInterfaces::~TestInterfaces() | 54 TestInterfaces::~TestInterfaces() |
51 { | 55 { |
52 m_accessibilityController->SetWebView(0); | 56 m_accessibilityController->SetWebView(0); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 if (!m_themeEngine.get()) | 200 if (!m_themeEngine.get()) |
197 m_themeEngine.reset(new WebTestThemeEngineMac()); | 201 m_themeEngine.reset(new WebTestThemeEngineMac()); |
198 #else | 202 #else |
199 if (!m_themeEngine.get()) | 203 if (!m_themeEngine.get()) |
200 m_themeEngine.reset(new WebTestThemeEngineMock()); | 204 m_themeEngine.reset(new WebTestThemeEngineMock()); |
201 #endif | 205 #endif |
202 return m_themeEngine.get(); | 206 return m_themeEngine.get(); |
203 } | 207 } |
204 | 208 |
205 } | 209 } |
OLD | NEW |