blob: 0bbb4066fbfed88e0d64cfc7022fc46aa3964f9c [file] [log] [blame]
// Copyright 2018 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "power_manager/proto_bindings/backlight.pb.h"
#include <string>
namespace power_manager {
namespace system {
class DBusWrapperStub;
namespace policy::test {
// Helper methods used by unit tests to invoke various D-Bus methods exported by
// BacklightController implementations.
void CallIncreaseScreenBrightness(system::DBusWrapperStub* wrapper);
void CallDecreaseScreenBrightness(system::DBusWrapperStub* wrapper,
bool allow_off);
void CallSetScreenBrightness(
system::DBusWrapperStub* wrapper,
double percent,
SetBacklightBrightnessRequest_Transition transition,
SetBacklightBrightnessRequest_Cause cause);
// Checks that the D-Bus signal at |index| has name |signal_name| and
// describes a brightness change to (rounded) |brightness_percent| for |cause|.
void CheckBrightnessChangedSignal(system::DBusWrapperStub* wrapper,
size_t index,
const std::string& signal_name,
double brightness_percent,
BacklightBrightnessChange_Cause cause);
} // namespace policy::test
} // namespace power_manager