OLD | NEW |
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 }; | 78 }; |
79 | 79 |
80 class FrameRateTest_Reference : public FrameRateTest { | 80 class FrameRateTest_Reference : public FrameRateTest { |
81 public: | 81 public: |
82 void SetUp() { | 82 void SetUp() { |
83 UseReferenceBuild(); | 83 UseReferenceBuild(); |
84 FrameRateTest::SetUp(); | 84 FrameRateTest::SetUp(); |
85 } | 85 } |
86 }; | 86 }; |
87 | 87 |
88 TEST_F(FrameRateTest, Blank_Steady) { | 88 #define FRAME_RATE_TEST(content, gesture) \ |
89 RunTest("blank", "steady", ""); | 89 TEST_F(FrameRateTest, content##_##gesture) { \ |
| 90 RunTest(#content, #gesture, ""); \ |
| 91 } \ |
| 92 TEST_F(FrameRateTest_Reference, content##_##gesture) { \ |
| 93 RunTest(#content, #gesture, "_ref"); \ |
90 } | 94 } |
91 | 95 |
92 TEST_F(FrameRateTest, Blank_Reading) { | 96 FRAME_RATE_TEST(blank, steady); |
93 RunTest("blank", "reading", ""); | 97 FRAME_RATE_TEST(blank, reading); |
94 } | 98 FRAME_RATE_TEST(blank, mouse_wheel); |
95 | 99 FRAME_RATE_TEST(blank, mac_fling); |
96 TEST_F(FrameRateTest, Blank_Mouse_Wheel) { | |
97 RunTest("blank", "mouse_wheel", ""); | |
98 } | |
99 | |
100 TEST_F(FrameRateTest, Blank_Mac_Fling) { | |
101 RunTest("blank", "mac_fling", ""); | |
102 } | |
103 | |
104 // TODO(darin): Need to update the reference build to a version that supports | |
105 // the webkitRequestAnimationFrame API. | |
106 #if 0 | |
107 TEST_F(FrameRateTest_Reference, Blank) { | |
108 RunTest("blank", "_ref"); | |
109 } | |
110 #endif | |
111 | 100 |
112 } // namespace | 101 } // namespace |
OLD | NEW |