#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/webui/web_ui_data_source_impl.h"
#include "content/public/test/browser_task_environment.h"
#include "content/test/test_content_client.h"
#include "services/network/public/mojom/content_security_policy.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
const int kDummyStringId = …;
const int kDummyDefaultResourceId = …;
const int kDummyResourceId = …;
const int kDummyJSResourceId = …;
const char16_t kDummyString[] = …;
const char kDummyDefaultResource[] = …;
const char kDummyResource[] = …;
const char kDummyJSResource[] = …;
class TestClient : public TestContentClient { … };
}
class WebUIDataSourceTest : public testing::Test { … };
void EmptyStringsCallback(bool from_js_module,
scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, EmptyStrings) { … }
TEST_F(WebUIDataSourceTest, EmptyModuleStrings) { … }
void SomeValuesCallback(scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, SomeValues) { … }
void DefaultResourceFoobarCallback(scoped_refptr<base::RefCountedMemory> data) { … }
void DefaultResourceStringsCallback(
scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, DefaultResource) { … }
void NamedResourceFoobarCallback(scoped_refptr<base::RefCountedMemory> data) { … }
void NamedResourceStringsCallback(scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, NamedResource) { … }
void NamedResourceWithQueryStringCallback(
scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, NamedResourceWithQueryString) { … }
void NamedResourceWithUrlFragmentCallback(
scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, NamedResourceWithUrlFragment) { … }
void WebUIDataSourceTest::RequestFilterQueryStringCallback(
scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, RequestFilterQueryString) { … }
TEST_F(WebUIDataSourceTest, MimeType) { … }
TEST_F(WebUIDataSourceTest, ShouldServeMimeTypeAsContentTypeHeader) { … }
void InvalidResourceCallback(scoped_refptr<base::RefCountedMemory> data) { … }
void NamedResourceBarJSCallback(scoped_refptr<base::RefCountedMemory> data) { … }
TEST_F(WebUIDataSourceTest, NoSetDefaultResource) { … }
TEST_F(WebUIDataSourceTest, SetCspValues) { … }
TEST_F(WebUIDataSourceTest, SetCrossOriginPolicyValues) { … }
}