| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 TEST_F(MediaTest, VideoBearFlac) { | 125 TEST_F(MediaTest, VideoBearFlac) { |
| 126 PlayVideo("bear.flac"); | 126 PlayVideo("bear.flac"); |
| 127 } | 127 } |
| 128 #endif | 128 #endif |
| 129 #endif | 129 #endif |
| 130 | 130 |
| 131 TEST_F(MediaTest, MAYBE_VideoBearWavPcm) { | 131 TEST_F(MediaTest, MAYBE_VideoBearWavPcm) { |
| 132 PlayVideo("bear_pcm.wav"); | 132 PlayVideo("bear_pcm.wav"); |
| 133 } | 133 } |
| 134 | 134 |
| 135 #if defined(OS_MACOSX) | 135 TEST_F(UILayoutTest, MediaUILayoutTest) { |
| 136 // http://crbug.com/95274 | |
| 137 #define MAYBE_MediaUILayoutTest FLAKY_MediaUILayoutTest | |
| 138 #elif defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | |
| 139 // http://crbug.com/103832 | |
| 140 #define MAYBE_MediaUILayoutTest FAILS_MediaUILayoutTest | |
| 141 #else | |
| 142 #define MAYBE_MediaUILayoutTest MediaUILayoutTest | |
| 143 #endif | |
| 144 | |
| 145 TEST_F(UILayoutTest, MAYBE_MediaUILayoutTest) { | |
| 146 static const char* kResources[] = { | 136 static const char* kResources[] = { |
| 147 "content", | 137 "content", |
| 148 "media-file.js", | 138 "media-file.js", |
| 149 "media-fullscreen.js", | 139 "media-fullscreen.js", |
| 150 "video-paint-test.js", | 140 "video-paint-test.js", |
| 151 "video-played.js", | 141 "video-played.js", |
| 152 "video-test.js", | 142 "video-test.js", |
| 153 }; | 143 }; |
| 154 | 144 |
| 155 static const char* kMediaTests[] = { | 145 static const char* kMediaTests[] = { |
| 156 "video-autoplay.html", | 146 "video-autoplay.html", |
| 157 // "video-loop.html", disabled due to 52887. | 147 // "video-loop.html", disabled due to 52887. |
| 158 "video-no-autoplay.html", | 148 "video-no-autoplay.html", |
| 159 // TODO(sergeyu): Add more tests here. | 149 // TODO(sergeyu): Add more tests here. |
| 160 }; | 150 }; |
| 161 | 151 |
| 162 FilePath test_dir; | 152 FilePath test_dir; |
| 163 FilePath media_test_dir; | 153 FilePath media_test_dir; |
| 164 media_test_dir = media_test_dir.AppendASCII("media"); | 154 media_test_dir = media_test_dir.AppendASCII("media"); |
| 165 InitializeForLayoutTest(test_dir, media_test_dir, kNoHttpPort); | 155 InitializeForLayoutTest(test_dir, media_test_dir, kNoHttpPort); |
| 166 | 156 |
| 167 // Copy resources first. | 157 // Copy resources first. |
| 168 for (size_t i = 0; i < arraysize(kResources); ++i) | 158 for (size_t i = 0; i < arraysize(kResources); ++i) |
| 169 AddResourceForLayoutTest( | 159 AddResourceForLayoutTest( |
| 170 test_dir, media_test_dir.AppendASCII(kResources[i])); | 160 test_dir, media_test_dir.AppendASCII(kResources[i])); |
| 171 | 161 |
| 172 for (size_t i = 0; i < arraysize(kMediaTests); ++i) | 162 for (size_t i = 0; i < arraysize(kMediaTests); ++i) |
| 173 RunLayoutTest(kMediaTests[i], kNoHttpPort); | 163 RunLayoutTest(kMediaTests[i], kNoHttpPort); |
| 174 } | 164 } |
| OLD | NEW |