| 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/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 UITest::SetUp(); | 62 UITest::SetUp(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 static const int kNumCycles = 5; | 65 static const int kNumCycles = 5; |
| 66 | 66 |
| 67 void PrintTimings(const char* label, TimeDelta timings[kNumCycles], | 67 void PrintTimings(const char* label, TimeDelta timings[kNumCycles], |
| 68 bool important) { | 68 bool important) { |
| 69 std::string times; | 69 std::string times; |
| 70 for (int i = 0; i < kNumCycles; ++i) | 70 for (int i = 0; i < kNumCycles; ++i) |
| 71 base::StringAppendF(×, "%.2f,", timings[i].InMillisecondsF()); | 71 base::StringAppendF(×, "%.2f,", timings[i].InMillisecondsF()); |
| 72 perf_test::PrintResultList("times", "", label, times, "ms", important); | 72 perf_test::PrintResultList( |
| 73 "times", std::string(), label, times, "ms", important); |
| 73 } | 74 } |
| 74 | 75 |
| 75 void RunTabSwitchingUITest(const char* label, bool important) { | 76 void RunTabSwitchingUITest(const char* label, bool important) { |
| 76 // Shut down from window UITest sets up automatically. | 77 // Shut down from window UITest sets up automatically. |
| 77 UITest::TearDown(); | 78 UITest::TearDown(); |
| 78 | 79 |
| 79 TimeDelta timings[kNumCycles]; | 80 TimeDelta timings[kNumCycles]; |
| 80 for (int i = 0; i < kNumCycles; ++i) { | 81 for (int i = 0; i < kNumCycles; ++i) { |
| 81 // Prepare for this test run. | 82 // Prepare for this test run. |
| 82 SetUp(); | 83 SetUp(); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 RunTabSwitchingUITest("t", true); | 194 RunTabSwitchingUITest("t", true); |
| 194 } | 195 } |
| 195 | 196 |
| 196 // Started failing with a webkit roll in r49936. See http://crbug.com/46751 | 197 // Started failing with a webkit roll in r49936. See http://crbug.com/46751 |
| 197 TEST_F(TabSwitchingUITest, DISABLED_TabSwitchRef) { | 198 TEST_F(TabSwitchingUITest, DISABLED_TabSwitchRef) { |
| 198 UseReferenceBuild(); | 199 UseReferenceBuild(); |
| 199 RunTabSwitchingUITest("t_ref", true); | 200 RunTabSwitchingUITest("t_ref", true); |
| 200 } | 201 } |
| 201 | 202 |
| 202 } // namespace | 203 } // namespace |
| OLD | NEW |