Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: chrome/browser/audio_layout_uitest.cc

Issue 9959028: Convert the media and audio UI test to a browser_test. browser_tests are sharded and run quicker, a… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/media_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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/file_path.h"
6 #include "chrome/test/ui/ui_layout_test.h"
7
8 namespace {
9 const char* kResources[] = {
10 "content",
11 "media-file.js",
12 "video-test.js",
13 };
14 } // anonymous namespace
15
16 class AudioUILayoutTest : public UILayoutTest {
17 protected:
18 virtual ~AudioUILayoutTest() { }
19
20 void RunMediaLayoutTest(const std::string& test_case_file_name) {
21 FilePath test_dir;
22 FilePath media_test_dir;
23 media_test_dir = media_test_dir.AppendASCII("media");
24 InitializeForLayoutTest(test_dir, media_test_dir, kNoHttpPort);
25
26 // Copy resources first.
27 for (size_t i = 0; i < arraysize(kResources); ++i) {
28 AddResourceForLayoutTest(
29 test_dir, media_test_dir.AppendASCII(kResources[i]));
30 }
31
32 printf("Test: %s\n", test_case_file_name.c_str());
33 RunLayoutTest(test_case_file_name, kNoHttpPort);
34 }
35 };
36
37
38 TEST_F(AudioUILayoutTest, AudioConstructorPreload) {
39 RunMediaLayoutTest("audio-constructor-preload.html");
40 }
41
42 TEST_F(AudioUILayoutTest, AudioConstructor) {
43 RunMediaLayoutTest("audio-constructor.html");
44 }
45
46 TEST_F(AudioUILayoutTest, AudioConstructorSrc) {
47 RunMediaLayoutTest("audio-constructor-src.html");
48 }
49
50 TEST_F(AudioUILayoutTest, AudioDataUrl) {
51 RunMediaLayoutTest("audio-data-url.html");
52 }
53
54 // The test fails since there is no real audio device on the build bots to get
55 // the ended event fired. Should pass once we run it on bots with audio devices.
56 TEST_F(AudioUILayoutTest, DISABLED_AudioGarbageCollect) {
57 RunMediaLayoutTest("audio-garbage-collect.html");
58 }
59
60 TEST_F(AudioUILayoutTest, AudioNoInstalledEngines) {
61 RunMediaLayoutTest("audio-no-installed-engines.html");
62 }
63
64 #if defined(OS_CHROMEOS) && defined(USE_AURA)
65 // http://crbug.com/115530
66 #define MAYBE_AudioOnlyVideoIntrinsicSize DISABLED_AudioOnlyVideoIntrinsicSize
67 #else
68 #define MAYBE_AudioOnlyVideoIntrinsicSize AudioOnlyVideoIntrinsicSize
69 #endif
70
71 TEST_F(AudioUILayoutTest, MAYBE_AudioOnlyVideoIntrinsicSize) {
72 RunMediaLayoutTest("audio-only-video-intrinsic-size.html");
73 }
74
75 TEST_F(AudioUILayoutTest, AudioPlayEvent) {
76 RunMediaLayoutTest("audio-play-event.html");
77 }
78
79 TEST_F(AudioUILayoutTest, MediaCanPlayWavAudio) {
80 RunMediaLayoutTest("media-can-play-wav-audio.html");
81 }
82
83 TEST_F(AudioUILayoutTest, MediaDocumentAudioSize) {
84 RunMediaLayoutTest("media-document-audio-size.html");
85 }
86
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698