chromium/chrome/test/media_router/media_router_one_ua_integration_browsertest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>

#include "base/cfi_buildflags.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/test/media_router/media_router_integration_browsertest.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "net/base/filename_util.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"

WebContents;

namespace media_router {

namespace {
const char kInitiateCloseFromReceiverPageScript[] =;
}

class MediaRouterIntegrationOneUABrowserTest
    : public MediaRouterIntegrationBrowserTest {};

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS)
#define MAYBE_Basic
#else
#define MAYBE_Basic
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest, MAYBE_Basic) {}
#undef MAYBE_Basic

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest,
                       MANUAL_SendAndOnMessage) {}

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest,
                       MANUAL_ReceiverCloseConnection) {}

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_Fail_SendMessage
#else
#define MAYBE_Fail_SendMessage
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest,
                       MAYBE_Fail_SendMessage) {}
#undef MAYBE_Fail_SendMessage

#if BUILDFLAG(IS_CHROMEOS) ||                                    \
    (BUILDFLAG(IS_LINUX) &&                                      \
     (BUILDFLAG(CFI_CAST_CHECK) || BUILDFLAG(CFI_ICALL_CHECK) || \
      BUILDFLAG(CFI_ENFORCEMENT_TRAP) ||                         \
      BUILDFLAG(CFI_ENFORCEMENT_DIAGNOSTIC)))
// https://crbug.com/966827. Flaky on Linux CFI.
// TODO(crbug.com/40567200): Flaky in Chromium OS waterfall.
#define MAYBE_ReconnectSession
#else
#define MAYBE_ReconnectSession
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest,
                       MAYBE_ReconnectSession) {}
#undef MAYBE_ReconnectSession

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS)
#define MAYBE_ReconnectSessionSameTab
#else
#define MAYBE_ReconnectSessionSameTab
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUABrowserTest,
                       MAYBE_ReconnectSessionSameTab) {}
#undef MAYBE_ReconnectSessionSameTab

class MediaRouterIntegrationOneUANoReceiverBrowserTest
    : public MediaRouterIntegrationOneUABrowserTest {};  // namespace media_router

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_Basic
#else
#define MAYBE_Basic
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUANoReceiverBrowserTest,
                       MAYBE_Basic) {}
#undef MAYBE_Basic

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_Fail_SendMessage
#else
#define MAYBE_Fail_SendMessage
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUANoReceiverBrowserTest,
                       MAYBE_Fail_SendMessage) {}
#undef MAYBE_Fail_SendMessage

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_ReconnectSession
#else
#define MAYBE_ReconnectSession
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUANoReceiverBrowserTest,
                       MAYBE_ReconnectSession) {}

// TODO(crbug.com/40567200): Flaky in Chromium waterfall.
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_ReconnectSessionSameTab
#else
#define MAYBE_ReconnectSessionSameTab
#endif
IN_PROC_BROWSER_TEST_P(MediaRouterIntegrationOneUANoReceiverBrowserTest,
                       MAYBE_ReconnectSessionSameTab) {}
#undef MAYBE_ReconnectSessionSameTab

INSTANTIATE_MEDIA_ROUTER_INTEGRATION_BROWER_TEST_SUITE();
INSTANTIATE_MEDIA_ROUTER_INTEGRATION_BROWER_TEST_SUITE();

}  // namespace media_router