chromium/content/browser/accessibility/site_per_process_accessibility_browsertest.cc

// Copyright 2014 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/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/cross_process_frame_connector.h"
#include "content/browser/renderer_host/frame_tree.h"
#include "content/browser/renderer_host/render_frame_proxy_host.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_child_frame.h"
#include "content/browser/site_per_process_browsertest.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/accessibility_notification_waiter.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 "content/public/test/scoped_accessibility_mode_override.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "content/test/render_document_feature.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/accessibility/ax_mode.h"
#include "ui/accessibility/platform/browser_accessibility.h"
#include "ui/accessibility/platform/browser_accessibility_manager.h"
#include "url/gurl.h"
#include "url/url_constants.h"

// These tests time out on Android.
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_SitePerProcessAccessibilityBrowserTest
#else
#define MAYBE_SitePerProcessAccessibilityBrowserTest
#endif
// "All/DISABLED_SitePerProcessAccessibilityBrowserTest" does not work. We need
// "DISABLED_All/...". TODO(crbug.com/40136187) delete when fixed.
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_All
#else
#define MAYBE_All
#endif

namespace content {

class MAYBE_SitePerProcessAccessibilityBrowserTest
    : public SitePerProcessBrowserTest {};

IN_PROC_BROWSER_TEST_P(MAYBE_SitePerProcessAccessibilityBrowserTest,
                       CrossSiteIframeAccessibility) {}

// TODO(aboxhall): Flaky test, discuss with dmazzoni
IN_PROC_BROWSER_TEST_P(MAYBE_SitePerProcessAccessibilityBrowserTest,
                       DISABLED_TwoCrossSiteNavigations) {}

// Ensure that enabling accessibility and doing a remote-to-local main frame
// navigation doesn't crash.  See https://crbug.com/762824.
IN_PROC_BROWSER_TEST_P(MAYBE_SitePerProcessAccessibilityBrowserTest,
                       RemoteToLocalMainFrameNavigation) {}

INSTANTIATE_TEST_SUITE_P();

class MAYBE_SitePerProcessAccessibilityDeviceScaleFactorBrowserTest
    : public MAYBE_SitePerProcessAccessibilityBrowserTest {};

IN_PROC_BROWSER_TEST_P(
    MAYBE_SitePerProcessAccessibilityDeviceScaleFactorBrowserTest,
    CrossSiteIframeCoordinates) {}

INSTANTIATE_TEST_SUITE_P();
}  // namespace content