OLD | NEW |
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/event_sender.h" |
| 9 #include "components/test_runner/test_interfaces.h" |
8 #include "components/test_runner/web_test_interfaces.h" | 10 #include "components/test_runner/web_test_interfaces.h" |
| 11 #include "content/common/input/input_event_utils.h" |
9 #include "content/public/common/content_client.h" | 12 #include "content/public/common/content_client.h" |
10 #include "content/public/renderer/render_thread.h" | 13 #include "content/public/renderer/render_thread.h" |
11 #include "content/public/renderer/render_view.h" | 14 #include "content/public/renderer/render_view.h" |
12 #include "content/public/test/layouttest_support.h" | 15 #include "content/public/test/layouttest_support.h" |
13 #include "content/shell/common/layout_test/layout_test_switches.h" | 16 #include "content/shell/common/layout_test/layout_test_switches.h" |
14 #include "content/shell/common/shell_messages.h" | 17 #include "content/shell/common/shell_messages.h" |
15 #include "content/shell/renderer/layout_test/blink_test_runner.h" | 18 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
16 #include "third_party/WebKit/public/web/WebKit.h" | 19 #include "third_party/WebKit/public/web/WebKit.h" |
17 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 20 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
18 #include "third_party/WebKit/public/web/WebView.h" | 21 #include "third_party/WebKit/public/web/WebView.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 std::string flags("--expose-gc"); | 67 std::string flags("--expose-gc"); |
65 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 68 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
66 | 69 |
67 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 70 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
68 switches::kStableReleaseMode)) { | 71 switches::kStableReleaseMode)) { |
69 WebRuntimeFeatures::enableTestOnlyFeatures(true); | 72 WebRuntimeFeatures::enableTestOnlyFeatures(true); |
70 } | 73 } |
71 | 74 |
72 test_interfaces_.reset(new test_runner::WebTestInterfaces); | 75 test_interfaces_.reset(new test_runner::WebTestInterfaces); |
73 test_interfaces_->ResetAll(); | 76 test_interfaces_->ResetAll(); |
| 77 test_interfaces_->SetSendWheelGestures(UseGestureBasedWheelScrolling()); |
74 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 78 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
75 switches::kEnableFontAntialiasing)) { | 79 switches::kEnableFontAntialiasing)) { |
76 blink::setFontAntialiasingEnabledForTest(true); | 80 blink::setFontAntialiasingEnabledForTest(true); |
77 } | 81 } |
78 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 82 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
79 switches::kAlwaysUseComplexText)) { | 83 switches::kAlwaysUseComplexText)) { |
80 blink::setAlwaysUseComplexTextForTest(true); | 84 blink::setAlwaysUseComplexTextForTest(true); |
81 } | 85 } |
82 } | 86 } |
83 | 87 |
(...skipping 11 matching lines...) Expand all Loading... |
95 | 99 |
96 return handled; | 100 return handled; |
97 } | 101 } |
98 | 102 |
99 void LayoutTestRenderProcessObserver::OnSetWebKitSourceDir( | 103 void LayoutTestRenderProcessObserver::OnSetWebKitSourceDir( |
100 const base::FilePath& webkit_source_dir) { | 104 const base::FilePath& webkit_source_dir) { |
101 webkit_source_dir_ = webkit_source_dir; | 105 webkit_source_dir_ = webkit_source_dir; |
102 } | 106 } |
103 | 107 |
104 } // namespace content | 108 } // namespace content |
OLD | NEW |