Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: chrome/test/perf/frame_rate/frame_rate_tests.cc

Issue 7185023: Support Chromium-branded builds and cleanup reference build usage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/page_cycler/page_cycler_test.cc ('k') | chrome/test/startup/startup_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.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/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 ASSERT_TRUE(results.find("sigma") != results.end()); 72 ASSERT_TRUE(results.find("sigma") != results.end());
73 73
74 std::string mean_and_error = results["mean"] + "," + results["sigma"]; 74 std::string mean_and_error = results["mean"] + "," + results["sigma"];
75 PrintResultMeanAndError("fps" + suffix, "", "", mean_and_error, 75 PrintResultMeanAndError("fps" + suffix, "", "", mean_and_error,
76 "frames-per-second", false); 76 "frames-per-second", false);
77 } 77 }
78 }; 78 };
79 79
80 class FrameRateTest_Reference : public FrameRateTest { 80 class FrameRateTest_Reference : public FrameRateTest {
81 public: 81 public:
82 // Override the browser directory that is used by UITest::SetUp to cause it
83 // to use the reference build instead.
84 void SetUp() { 82 void SetUp() {
85 FilePath dir; 83 UseReferenceBuild();
86 PathService::Get(chrome::DIR_TEST_TOOLS, &dir);
87 dir = dir.AppendASCII("reference_build");
88 #if defined(OS_WIN)
89 dir = dir.AppendASCII("chrome");
90 #elif defined(OS_LINUX)
91 dir = dir.AppendASCII("chrome_linux");
92 #elif defined(OS_MACOSX)
93 dir = dir.AppendASCII("chrome_mac");
94 #endif
95 browser_directory_ = dir;
96 FrameRateTest::SetUp(); 84 FrameRateTest::SetUp();
97 } 85 }
98 }; 86 };
99 87
100 TEST_F(FrameRateTest, Blank_Steady) { 88 TEST_F(FrameRateTest, Blank_Steady) {
101 RunTest("blank", "steady", ""); 89 RunTest("blank", "steady", "");
102 } 90 }
103 91
104 TEST_F(FrameRateTest, Blank_Reading) { 92 TEST_F(FrameRateTest, Blank_Reading) {
105 RunTest("blank", "reading", ""); 93 RunTest("blank", "reading", "");
106 } 94 }
107 95
108 TEST_F(FrameRateTest, Blank_Mouse_Wheel) { 96 TEST_F(FrameRateTest, Blank_Mouse_Wheel) {
109 RunTest("blank", "mouse_wheel", ""); 97 RunTest("blank", "mouse_wheel", "");
110 } 98 }
111 99
112 TEST_F(FrameRateTest, Blank_Mac_Fling) { 100 TEST_F(FrameRateTest, Blank_Mac_Fling) {
113 RunTest("blank", "mac_fling", ""); 101 RunTest("blank", "mac_fling", "");
114 } 102 }
115 103
116 // TODO(darin): Need to update the reference build to a version that supports 104 // TODO(darin): Need to update the reference build to a version that supports
117 // the webkitRequestAnimationFrame API. 105 // the webkitRequestAnimationFrame API.
118 #if 0 106 #if 0
119 TEST_F(FrameRateTest_Reference, Blank) { 107 TEST_F(FrameRateTest_Reference, Blank) {
120 RunTest("blank", "_ref"); 108 RunTest("blank", "_ref");
121 } 109 }
122 #endif 110 #endif
123 111
124 } // namespace 112 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/page_cycler/page_cycler_test.cc ('k') | chrome/test/startup/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698