OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 // Whether to print more verbose output. | 218 // Whether to print more verbose output. |
219 bool verbose_; | 219 bool verbose_; |
220 | 220 |
221 // Current test flags combination, determining the behavior of the test. | 221 // Current test flags combination, determining the behavior of the test. |
222 int test_flags_; | 222 int test_flags_; |
223 }; | 223 }; |
224 | 224 |
225 void LatencyTest::SetUpCommandLine(CommandLine* command_line) { | 225 void LatencyTest::SetUpCommandLine(CommandLine* command_line) { |
226 BrowserPerfTest::SetUpCommandLine(command_line); | 226 BrowserPerfTest::SetUpCommandLine(command_line); |
227 // This enables DOM automation for tab contents. | |
228 EnableDOMAutomation(); | |
229 if (CommandLine::ForCurrentProcess()-> | 227 if (CommandLine::ForCurrentProcess()-> |
230 HasSwitch(switches::kEnableThreadedCompositing)) { | 228 HasSwitch(switches::kEnableThreadedCompositing)) { |
231 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | 229 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
232 } | 230 } |
233 command_line->AppendSwitch(switches::kDisableBackgroundNetworking); | 231 command_line->AppendSwitch(switches::kDisableBackgroundNetworking); |
234 } | 232 } |
235 | 233 |
236 std::vector<int> LatencyTest::GetAllBehaviors() { | 234 std::vector<int> LatencyTest::GetAllBehaviors() { |
237 std::vector<int> behaviors; | 235 std::vector<int> behaviors; |
238 int max_behaviors = kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy; | 236 int max_behaviors = kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy; |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 INSTANTIATE_TEST_CASE_P(, LatencyTest, ::testing::Values( | 665 INSTANTIATE_TEST_CASE_P(, LatencyTest, ::testing::Values( |
668 0, | 666 0, |
669 kInputHeavy, | 667 kInputHeavy, |
670 kInputHeavy | kInputDirty | kRafHeavy, | 668 kInputHeavy | kInputDirty | kRafHeavy, |
671 kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy, | 669 kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy, |
672 kInputDirty | kPaintHeavy, | 670 kInputDirty | kPaintHeavy, |
673 kInputDirty | kRafHeavy | kPaintHeavy | 671 kInputDirty | kRafHeavy | kPaintHeavy |
674 )); | 672 )); |
675 | 673 |
676 } // namespace | 674 } // namespace |
OLD | NEW |