#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/build_config.h"
#include "chrome/browser/battery/battery_metrics.h"
#include "chrome/browser/browser_process.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/metrics/content/subprocess_metrics_provider.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/device/public/mojom/battery_monitor.mojom.h"
#include "services/device/public/mojom/battery_status.mojom.h"
namespace {
void RetryForHistogramBucketUntilCountReached(
base::HistogramTester* histogram_tester,
const std::string& histogram_name,
base::HistogramBase::Sample target_bucket,
size_t count) { … }
class MockBatteryMonitor : public device::mojom::BatteryMonitor { … };
class BatteryMetricsBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(BatteryMetricsBrowserTest, BatteryDropUMA) { … }
}