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

Side by Side Diff: cc/test/begin_frame_args_test.h

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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
« no previous file with comments | « cc/surfaces/surface_sequence.h ('k') | cc/test/begin_frame_args_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CC_TEST_BEGIN_FRAME_ARGS_TEST_H_ 5 #ifndef CC_TEST_BEGIN_FRAME_ARGS_TEST_H_
6 #define CC_TEST_BEGIN_FRAME_ARGS_TEST_H_ 6 #define CC_TEST_BEGIN_FRAME_ARGS_TEST_H_
7 7
8 #include <stdint.h>
9
8 #include <iosfwd> 10 #include <iosfwd>
9 11
10 #include "base/test/simple_test_tick_clock.h" 12 #include "base/test/simple_test_tick_clock.h"
11 #include "base/time/time.h" 13 #include "base/time/time.h"
12 #include "cc/output/begin_frame_args.h" 14 #include "cc/output/begin_frame_args.h"
13 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
14 16
15 namespace cc { 17 namespace cc {
16 18
17 // Functions for quickly creating BeginFrameArgs 19 // Functions for quickly creating BeginFrameArgs
18 BeginFrameArgs CreateBeginFrameArgsForTesting( 20 BeginFrameArgs CreateBeginFrameArgsForTesting(
19 BeginFrameArgs::CreationLocation location); 21 BeginFrameArgs::CreationLocation location);
20 BeginFrameArgs CreateBeginFrameArgsForTesting( 22 BeginFrameArgs CreateBeginFrameArgsForTesting(
21 BeginFrameArgs::CreationLocation location, 23 BeginFrameArgs::CreationLocation location,
22 base::TimeTicks frame_time); 24 base::TimeTicks frame_time);
23 BeginFrameArgs CreateBeginFrameArgsForTesting( 25 BeginFrameArgs CreateBeginFrameArgsForTesting(
24 BeginFrameArgs::CreationLocation location, 26 BeginFrameArgs::CreationLocation location,
25 int64 frame_time, 27 int64_t frame_time,
26 int64 deadline, 28 int64_t deadline,
27 int64 interval); 29 int64_t interval);
28 BeginFrameArgs CreateBeginFrameArgsForTesting( 30 BeginFrameArgs CreateBeginFrameArgsForTesting(
29 BeginFrameArgs::CreationLocation location, 31 BeginFrameArgs::CreationLocation location,
30 int64 frame_time, 32 int64_t frame_time,
31 int64 deadline, 33 int64_t deadline,
32 int64 interval, 34 int64_t interval,
33 BeginFrameArgs::BeginFrameArgsType type); 35 BeginFrameArgs::BeginFrameArgsType type);
34 36
35 // Creates a BeginFrameArgs using the fake Now value stored on the 37 // Creates a BeginFrameArgs using the fake Now value stored on the
36 // OrderSimpleTaskRunner. 38 // OrderSimpleTaskRunner.
37 BeginFrameArgs CreateBeginFrameArgsForTesting( 39 BeginFrameArgs CreateBeginFrameArgsForTesting(
38 BeginFrameArgs::CreationLocation location, 40 BeginFrameArgs::CreationLocation location,
39 base::SimpleTestTickClock* now_src); 41 base::SimpleTestTickClock* now_src);
40 42
41 // gtest helpers -- these *must* be in the same namespace as the types they 43 // gtest helpers -- these *must* be in the same namespace as the types they
42 // operate on. 44 // operate on.
43 45
44 // Allow "EXPECT_EQ(args1, args2);" 46 // Allow "EXPECT_EQ(args1, args2);"
45 // We don't define operator!= because EXPECT_NE(args1, args2) isn't all that 47 // We don't define operator!= because EXPECT_NE(args1, args2) isn't all that
46 // sensible. 48 // sensible.
47 bool operator==(const BeginFrameArgs& lhs, const BeginFrameArgs& rhs); 49 bool operator==(const BeginFrameArgs& lhs, const BeginFrameArgs& rhs);
48 50
49 // Allow gtest to pretty print begin frame args. 51 // Allow gtest to pretty print begin frame args.
50 ::std::ostream& operator<<(::std::ostream& os, const BeginFrameArgs& args); 52 ::std::ostream& operator<<(::std::ostream& os, const BeginFrameArgs& args);
51 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os); 53 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os);
52 54
53 } // namespace cc 55 } // namespace cc
54 56
55 #endif // CC_TEST_BEGIN_FRAME_ARGS_TEST_H_ 57 #endif // CC_TEST_BEGIN_FRAME_ARGS_TEST_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_sequence.h ('k') | cc/test/begin_frame_args_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698