chromium/chrome/browser/storage/database_access_browsertest.cc

// Copyright 2023 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/test/scoped_feature_list.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "third_party/blink/public/common/features.h"

class WebSqlAccessBrowserTest : public InProcessBrowserTest {};

// WebSQL is disabled everywhere except Android WebView (crbug.com/333756088).
#if !BUILDFLAG(IS_ANDROID)
#define MAYBE_DefaultDisabled
#else
#define MAYBE_DefaultDisabled
#endif
IN_PROC_BROWSER_TEST_F(WebSqlAccessBrowserTest, MAYBE_DefaultDisabled) {}

class WebSqlAccessEnabledBrowserTest : public WebSqlAccessBrowserTest {};

// WebSQL is disabled everywhere except Android WebView (crbug.com/333756088).
#if !BUILDFLAG(IS_ANDROID)
#define MAYBE_FeatureFlagEnabled
#else
#define MAYBE_FeatureFlagEnabled
#endif
// WebSQL should be accessible when blink::features::kWebSQLAccess is enabled.
IN_PROC_BROWSER_TEST_F(WebSqlAccessEnabledBrowserTest,
                       MAYBE_FeatureFlagEnabled) {}