blob: 9f72ab836acf463c4f85c9a4468de3a868dd93ba [file] [log] [blame]
guidoufc3a3ed82016-04-15 19:00:591// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/command_line.h"
6#include "base/macros.h"
7#include "content/public/common/content_switches.h"
8#include "content/test/webrtc_content_browsertest_base.h"
9
10namespace {
11
12const char kJavaScriptFeaturesNeeded[] = "--expose-gc";
13const char kDataChannelHtmlFile[] = "/media/datachannel_test.html";
14
15} // namespace
16
17namespace content {
18
guidou4fd182832016-06-01 09:34:5319#if defined(OS_WIN) || (defined(OS_ANDROID) && defined(ADDRESS_SANITIZER))
guidou726e38c2016-05-20 14:31:4520// GC does not work correctly in some cases under Android ASAN.
21// See https://crbug.com/611620.
guidou4fd182832016-06-01 09:34:5322// This test has become flaky on Windows. See https://crbug.com/616388
guidou726e38c2016-05-20 14:31:4523#define MAYBE_WebRtcDataChannelTest DISABLED_WebRtcDataChannelTest
24#else
25#define MAYBE_WebRtcDataChannelTest WebRtcDataChannelTest
26#endif
27
28class MAYBE_WebRtcDataChannelTest : public WebRtcContentBrowserTest {
guidoufc3a3ed82016-04-15 19:00:5929 public:
guidou726e38c2016-05-20 14:31:4530 MAYBE_WebRtcDataChannelTest() {}
31 ~MAYBE_WebRtcDataChannelTest() override {}
guidoufc3a3ed82016-04-15 19:00:5932
33 void SetUpCommandLine(base::CommandLine* command_line) override {
34 WebRtcContentBrowserTest::SetUpCommandLine(command_line);
35 AppendUseFakeUIForMediaStreamFlag();
36 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
37 switches::kJavaScriptFlags, kJavaScriptFeaturesNeeded);
38 }
39
40 private:
guidou726e38c2016-05-20 14:31:4541 DISALLOW_COPY_AND_ASSIGN(MAYBE_WebRtcDataChannelTest);
guidoufc3a3ed82016-04-15 19:00:5942};
43
guidou726e38c2016-05-20 14:31:4544IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcDataChannelTest, DataChannelGC) {
guidoufc3a3ed82016-04-15 19:00:5945 MakeTypicalCall("testDataChannelGC();", kDataChannelHtmlFile);
46}
47
48} // namespace content