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(name, gesture) \ |
89 RunTest("blank", "steady", ""); | 89 TEST_F(FrameRateTest, name) { \ |
90 RunTest("blank", gesture, ""); \ | |
91 } \ | |
92 TEST_F(FrameRateTest_Reference, name) { \ | |
93 RunTest("blank", gesture, "_ref"); \ | |
90 } | 94 } |
91 | 95 |
92 TEST_F(FrameRateTest, Blank_Reading) { | 96 FRAME_RATE_TEST(Blank_Steady, "steady"); |
darin (slow to review)
2011/07/07 23:51:02
eventually, i imagine we'll have more than just th
jrt
2011/07/08 00:02:11
Ah, much cleaner. Thanks.
| |
93 RunTest("blank", "reading", ""); | 97 FRAME_RATE_TEST(Blank_Reading, "reading"); |
94 } | 98 FRAME_RATE_TEST(Blank_MouseWheel, "mouse_wheel"); |
95 | 99 FRAME_RATE_TEST(Blank_MacFling, "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 |