#include "base/debug/gdi_debug_util_win.h"
#include <windows.h>
#include "base/win/scoped_hdc.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(GdiDebugUtilWin, GdiHandleCountsCreateDC) {
base::debug::GdiHandleCounts handle_counts_start =
base::debug::GetGDIHandleCountsInCurrentProcessForTesting();
base::win::ScopedGetDC dc(nullptr);
ASSERT_TRUE(static_cast<HDC>(dc));
base::debug::GdiHandleCounts handle_counts_now =
base::debug::GetGDIHandleCountsInCurrentProcessForTesting();
EXPECT_EQ(1, handle_counts_now.dcs - handle_counts_start.dcs);
EXPECT_EQ(
1, handle_counts_now.total_tracked - handle_counts_start.total_tracked);
}