<commit_before>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/test/layout_browsertest.h"

class AudioLayoutTest : public InProcessBrowserLayoutTest {
 protected:
  AudioLayoutTest() : InProcessBrowserLayoutTest(
      FilePath(), FilePath().AppendASCII("media")) {
  }
};

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructorPreload) {
  RunLayoutTest("audio-constructor-preload.html");
}

#if defined(OS_LINUX) && defined(USE_AURA)
// http://crbug.com/154157
IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructor) {
  RunLayoutTest("audio-constructor.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructorSrc) {
  RunLayoutTest("audio-constructor-src.html");
}
#endif  // defined(OS_LINUX) && defined(USE_AURA)

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioDataUrl) {
  RunLayoutTest("audio-data-url.html");
}

// The test fails since there is no real audio device on the build bots to get
// the ended event fired. Should pass once we run it on bots with audio devices.
IN_PROC_BROWSER_TEST_F(AudioLayoutTest, DISABLED_AudioGarbageCollect) {
  RunLayoutTest("audio-garbage-collect.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioNoInstalledEngines) {
  RunLayoutTest("audio-no-installed-engines.html");
}

#if defined(OS_CHROMEOS) && defined(USE_AURA)
// http://crbug.com/115530
#define MAYBE_AudioOnlyVideoIntrinsicSize DISABLED_AudioOnlyVideoIntrinsicSize
#else
#define MAYBE_AudioOnlyVideoIntrinsicSize AudioOnlyVideoIntrinsicSize
#endif

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, MAYBE_AudioOnlyVideoIntrinsicSize) {
  RunLayoutTest("audio-only-video-intrinsic-size.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioPlayEvent) {
  RunLayoutTest("audio-play-event.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, MediaCanPlayWavAudio) {<commit_msg>Enable AudioLayoutTest.AudioConstructor and AudioLayoutTest.AudioConstructorSrc now that the bug is fixed.<commit_after>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/test/layout_browsertest.h"

class AudioLayoutTest : public InProcessBrowserLayoutTest {
 protected:
  AudioLayoutTest() : InProcessBrowserLayoutTest(
      FilePath(), FilePath().AppendASCII("media")) {
  }
};

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructorPreload) {
  RunLayoutTest("audio-constructor-preload.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructor) {
  RunLayoutTest("audio-constructor.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioConstructorSrc) {
  RunLayoutTest("audio-constructor-src.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioDataUrl) {
  RunLayoutTest("audio-data-url.html");
}

// The test fails since there is no real audio device on the build bots to get
// the ended event fired. Should pass once we run it on bots with audio devices.
IN_PROC_BROWSER_TEST_F(AudioLayoutTest, DISABLED_AudioGarbageCollect) {
  RunLayoutTest("audio-garbage-collect.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioNoInstalledEngines) {
  RunLayoutTest("audio-no-installed-engines.html");
}

#if defined(OS_CHROMEOS) && defined(USE_AURA)
// http://crbug.com/115530
#define MAYBE_AudioOnlyVideoIntrinsicSize DISABLED_AudioOnlyVideoIntrinsicSize
#else
#define MAYBE_AudioOnlyVideoIntrinsicSize AudioOnlyVideoIntrinsicSize
#endif

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, MAYBE_AudioOnlyVideoIntrinsicSize) {
  RunLayoutTest("audio-only-video-intrinsic-size.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, AudioPlayEvent) {
  RunLayoutTest("audio-play-event.html");
}

IN_PROC_BROWSER_TEST_F(AudioLayoutTest, MediaCanPlayWavAudio) {
{'fraction_non_alphanumeric': 0.09924262209454165, 'fraction_numerical': 0.0067902846696265345, 'mean_word_length': 6.8323108384458076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5546666', 'n_tokens_mistral': 1322, 'n_tokens_neox': 1261, 'n_words': 234}