chromium/dbus/bus_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "dbus/bus.h"

#include <memory>

#include "base/files/file_descriptor_watcher_posix.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_pump_type.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "dbus/error.h"
#include "dbus/exported_object.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "dbus/test_service.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace dbus {

namespace {

// Test helper for BusTest.ListenForServiceOwnerChange that wraps a
// base::RunLoop. At Run() time, the caller pass in the expected number of
// quit calls, and at QuitIfConditionIsSatisified() time, only quit the RunLoop
// if the expected number of quit calls have been reached.
class RunLoopWithExpectedCount {};

// Test helper for BusTest.ListenForServiceOwnerChange.
void OnServiceOwnerChanged(RunLoopWithExpectedCount* run_loop_state,
                           std::string* service_owner,
                           int* num_of_owner_changes,
                           const std::string& new_service_owner) {}

}  // namespace

TEST(BusTest, GetObjectProxy) {}

TEST(BusTest, GetObjectProxyIgnoreUnknownService) {}

TEST(BusTest, RemoveObjectProxy) {}

TEST(BusTest, GetExportedObject) {}

TEST(BusTest, UnregisterExportedObject) {}

TEST(BusTest, ShutdownAndBlock) {}

TEST(BusTest, ShutdownAndBlockWithDBusThread) {}

TEST(BusTest, DoubleAddAndRemoveMatch) {}

TEST(BusTest, ListenForServiceOwnerChange) {}

TEST(BusTest, GetConnectionName) {}

}  // namespace dbus