chromium/chrome/browser/ui/webui/webui_url_hashes_browsertest.cc

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

#include "base/hash/hash.h"
#include "base/metrics/histogram_base.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/ui/webui/webui_url_hashes.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/webui_config_map.h"
#include "content/public/test/browser_test.h"

WebUIUrlHashesBrowserTest;

// Tests that the URL hashes are listed in enum WebUIUrlHashes from
// //tools/metrics/histograms/enums.xml. Not finding a URL will cause a CHECK
// failure. enum WebUIUrlHashes is used to collect WebUI usage statistics.
// The URL hash is recorded in histogram "WebUI.CreatedForUrl" when a WebUI
// is opened.
IN_PROC_BROWSER_TEST_F(WebUIUrlHashesBrowserTest, UrlsInHistogram) {}