| 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_thread_observer.
h" | 5 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/test_runner/test_interfaces.h" | 8 #include "components/test_runner/test_interfaces.h" |
| 9 #include "components/test_runner/web_test_interfaces.h" | 9 #include "components/test_runner/web_test_interfaces.h" |
| 10 #include "components/test_runner/web_test_runner.h" | 10 #include "components/test_runner/web_test_runner.h" |
| 11 #include "content/common/input/input_event_utils.h" | |
| 12 #include "content/public/common/content_client.h" | 11 #include "content/public/common/content_client.h" |
| 13 #include "content/public/renderer/render_thread.h" | 12 #include "content/public/renderer/render_thread.h" |
| 14 #include "content/public/test/layouttest_support.h" | 13 #include "content/public/test/layouttest_support.h" |
| 15 #include "content/shell/common/layout_test/layout_test_messages.h" | 14 #include "content/shell/common/layout_test/layout_test_messages.h" |
| 16 #include "content/shell/common/layout_test/layout_test_switches.h" | 15 #include "content/shell/common/layout_test/layout_test_switches.h" |
| 17 #include "content/shell/common/shell_messages.h" | 16 #include "content/shell/common/shell_messages.h" |
| 18 #include "content/shell/renderer/layout_test/blink_test_runner.h" | 17 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 19 #include "third_party/WebKit/public/web/WebKit.h" | 18 #include "third_party/WebKit/public/web/WebKit.h" |
| 20 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 19 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 21 #include "v8/include/v8.h" | 20 #include "v8/include/v8.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 std::string flags("--expose-gc"); | 45 std::string flags("--expose-gc"); |
| 47 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 46 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
| 48 | 47 |
| 49 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 48 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 50 switches::kStableReleaseMode)) { | 49 switches::kStableReleaseMode)) { |
| 51 WebRuntimeFeatures::enableTestOnlyFeatures(true); | 50 WebRuntimeFeatures::enableTestOnlyFeatures(true); |
| 52 } | 51 } |
| 53 | 52 |
| 54 test_interfaces_.reset(new test_runner::WebTestInterfaces); | 53 test_interfaces_.reset(new test_runner::WebTestInterfaces); |
| 55 test_interfaces_->ResetAll(); | 54 test_interfaces_->ResetAll(); |
| 56 test_interfaces_->SetSendWheelGestures(UseGestureBasedWheelScrolling()); | |
| 57 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 55 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 58 switches::kEnableFontAntialiasing)) { | 56 switches::kEnableFontAntialiasing)) { |
| 59 blink::setFontAntialiasingEnabledForTest(true); | 57 blink::setFontAntialiasingEnabledForTest(true); |
| 60 } | 58 } |
| 61 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 59 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 62 switches::kAlwaysUseComplexText)) { | 60 switches::kAlwaysUseComplexText)) { |
| 63 blink::setAlwaysUseComplexTextForTest(true); | 61 blink::setAlwaysUseComplexTextForTest(true); |
| 64 } | 62 } |
| 65 } | 63 } |
| 66 | 64 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 97 webkit_source_dir_ = webkit_source_dir; | 95 webkit_source_dir_ = webkit_source_dir; |
| 98 } | 96 } |
| 99 | 97 |
| 100 void LayoutTestRenderThreadObserver::OnReplicateLayoutTestRuntimeFlagsChanges( | 98 void LayoutTestRenderThreadObserver::OnReplicateLayoutTestRuntimeFlagsChanges( |
| 101 const base::DictionaryValue& changed_layout_test_runtime_flags) { | 99 const base::DictionaryValue& changed_layout_test_runtime_flags) { |
| 102 test_interfaces()->TestRunner()->ReplicateLayoutTestRuntimeFlagsChanges( | 100 test_interfaces()->TestRunner()->ReplicateLayoutTestRuntimeFlagsChanges( |
| 103 changed_layout_test_runtime_flags); | 101 changed_layout_test_runtime_flags); |
| 104 } | 102 } |
| 105 | 103 |
| 106 } // namespace content | 104 } // namespace content |
| OLD | NEW |