blob: ea3ee520fbe970cc1054259d834ef3801f14be0f [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/win/taskbar_icon_finder.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
// The most simple test possible to ensure that the finder doesn't leak or
// cause crashes.
TEST(TaskbarIconFinder, Simple) {
base::test::TaskEnvironment task_environment;
base::RunLoop run_loop;
FindTaskbarIcon(
base::BindOnce([](base::OnceClosure quit,
const gfx::Rect& rect) { std::move(quit).Run(); },
run_loop.QuitWhenIdleClosure()));
run_loop.Run();
}