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
3 // found in the LICENSE file.
5 #ifndef UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_
6 #define UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_
10 #include "ui/display/types/display_constants.h"
20 class DisplaySnapshot
;
24 // Strings returned by TestNativeDisplayDelegate::GetActionsAndClear() to
25 // describe various actions that were performed.
26 const char kInitXRandR
[] = "init";
27 const char kGrab
[] = "grab";
28 const char kUngrab
[] = "ungrab";
29 const char kSync
[] = "sync";
30 const char kForceDPMS
[] = "dpms";
31 const char kTakeDisplayControl
[] = "take";
32 const char kRelinquishDisplayControl
[] = "relinquish";
34 // String returned by TestNativeDisplayDelegate::GetActionsAndClear() if no
35 // actions were requested.
36 const char kNoActions
[] = "";
38 std::string
DisplaySnapshotToString(const DisplaySnapshot
& output
);
40 // Returns a string describing a TestNativeDisplayDelegate::SetBackgroundColor()
42 std::string
GetBackgroundAction(uint32_t color_argb
);
44 // Returns a string describing a TestNativeDisplayDelegate::AddOutputMode()
46 std::string
GetAddOutputModeAction(const DisplaySnapshot
& output
,
47 const DisplayMode
* mode
);
49 // Returns a string describing a TestNativeDisplayDelegate::Configure()
51 std::string
GetCrtcAction(const DisplaySnapshot
& output
,
52 const DisplayMode
* mode
,
53 const gfx::Point
& origin
);
55 // Returns a string describing a TestNativeDisplayDelegate::CreateFramebuffer()
57 std::string
GetFramebufferAction(const gfx::Size
& size
,
58 const DisplaySnapshot
* out1
,
59 const DisplaySnapshot
* out2
);
61 // Returns a string describing a TestNativeDisplayDelegate::SetHDCPState() call.
62 std::string
GetSetHDCPStateAction(const DisplaySnapshot
& output
,
65 // Joins a sequence of strings describing actions (e.g. kScreenDim) such
66 // that they can be compared against a string returned by
67 // ActionLogger::GetActionsAndClear(). The list of actions must be
68 // terminated by a NULL pointer.
69 std::string
JoinActions(const char* action
, ...);
74 #endif // UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_