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

Side by Side Diff: content/browser/media_browsertest.cc

Issue 10941011: Rewrite layout_browsertests to use content_shell --dump-render-tree to execute layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); 162 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true));
163 163
164 class MediaLayoutTest : public InProcessBrowserLayoutTest { 164 class MediaLayoutTest : public InProcessBrowserLayoutTest {
165 protected: 165 protected:
166 MediaLayoutTest() : InProcessBrowserLayoutTest( 166 MediaLayoutTest() : InProcessBrowserLayoutTest(
167 FilePath(), FilePath().AppendASCII("media")) { 167 FilePath(), FilePath().AppendASCII("media")) {
168 } 168 }
169 virtual ~MediaLayoutTest() {} 169 virtual ~MediaLayoutTest() {}
170 170
171 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 171 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
172 InProcessBrowserLayoutTest::SetUpCommandLine(command_line);
172 // TODO(dalecurtis): Not all Buildbots have viable audio devices, so disable 173 // TODO(dalecurtis): Not all Buildbots have viable audio devices, so disable
173 // audio to prevent tests from hanging; e.g., a device which is hardware 174 // audio to prevent tests from hanging; e.g., a device which is hardware
174 // muted. See http://crbug.com/120749 175 // muted. See http://crbug.com/120749
175 command_line->AppendSwitch(switches::kDisableAudio); 176 command_line->AppendSwitch(switches::kDisableAudio);
176 } 177 }
177
178 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
179 InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture();
180 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
181 FilePath().AppendASCII("content"));
182 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
183 FilePath().AppendASCII("media-file.js"));
184 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
185 FilePath().AppendASCII("media-fullscreen.js"));
186 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
187 FilePath().AppendASCII("video-paint-test.js"));
188 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
189 FilePath().AppendASCII("video-played.js"));
190 AddResourceForLayoutTest(FilePath().AppendASCII("media"),
191 FilePath().AppendASCII("video-test.js"));
192 }
193 }; 178 };
194 179
195 // Each browser test can only correspond to a single layout test, otherwise the 180 // Each browser test can only correspond to a single layout test, otherwise the
196 // 45 second timeout per test is not long enough for N tests on debug/asan/etc 181 // 45 second timeout per test is not long enough for N tests on debug/asan/etc
197 // builds. 182 // builds.
198 183
199 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoAutoplayTest) { 184 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoAutoplayTest) {
200 RunLayoutTest("video-autoplay.html"); 185 RunLayoutTest("video-autoplay.html");
201 } 186 }
202 187
203 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoLoopTest) { 188 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoLoopTest) {
204 RunLayoutTest("video-loop.html"); 189 RunLayoutTest("video-loop.html");
205 } 190 }
206 191
207 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoNoAutoplayTest) { 192 IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoNoAutoplayTest) {
208 RunLayoutTest("video-no-autoplay.html"); 193 RunLayoutTest("video-no-autoplay.html");
209 } 194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698