| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/media/media_browsertest.h" | 5 #include "content/browser/media/media_browsertest.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthVP9) { | 145 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthVP9) { |
| 146 PlayVideo("bear-320x180-hi10p-vp9.webm", GetParam()); | 146 PlayVideo("bear-320x180-hi10p-vp9.webm", GetParam()); |
| 147 } | 147 } |
| 148 | 148 |
| 149 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBear12DepthVP9) { | 149 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBear12DepthVP9) { |
| 150 PlayVideo("bear-320x180-hi12p-vp9.webm", GetParam()); | 150 PlayVideo("bear-320x180-hi12p-vp9.webm", GetParam()); |
| 151 } | 151 } |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 154 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
| 155 // Crashes on Mac http://crbug.com/621857 | 155 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMp4) { |
| 156 #if defined(OS_MACOSX) | |
| 157 #define MAYBE_VideoBearMp4 DISABLED_VideoBearMp4 | |
| 158 #else | |
| 159 #define MAYBE_VideoBearMp4 VideoBearMp4 | |
| 160 #endif | |
| 161 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearMp4) { | |
| 162 PlayVideo("bear.mp4", GetParam()); | 156 PlayVideo("bear.mp4", GetParam()); |
| 163 } | 157 } |
| 164 | 158 |
| 165 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMp4Vp9) { | 159 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMp4Vp9) { |
| 166 PlayVideo("bear-320x240-v_frag-vp9.mp4", GetParam()); | 160 PlayVideo("bear-320x240-v_frag-vp9.mp4", GetParam()); |
| 167 } | 161 } |
| 168 | 162 |
| 169 // Android devices usually only support baseline, main and high. | 163 // Android devices usually only support baseline, main and high. |
| 170 #if !defined(OS_ANDROID) | 164 #if !defined(OS_ANDROID) |
| 171 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthMp4) { | 165 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthMp4) { |
| 172 PlayVideo("bear-320x180-hi10p.mp4", GetParam()); | 166 PlayVideo("bear-320x180-hi10p.mp4", GetParam()); |
| 173 } | 167 } |
| 174 #endif // !defined(OS_ANDROID) | 168 #endif // !defined(OS_ANDROID) |
| 175 | 169 |
| 176 // Crashes on Mac only. http://crbug.com/621857 | 170 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentMp4) { |
| 177 #if defined(OS_MACOSX) | |
| 178 #define MAYBE_VideoBearSilentMp4 DISABLED_VideoBearSilentMp4 | |
| 179 #else | |
| 180 #define MAYBE_VideoBearSilentMp4 VideoBearSilentMp4 | |
| 181 #endif | |
| 182 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearSilentMp4) { | |
| 183 PlayVideo("bear_silent.mp4", GetParam()); | 171 PlayVideo("bear_silent.mp4", GetParam()); |
| 184 } | 172 } |
| 185 | 173 |
| 186 // While we support the big endian (be) PCM codecs on Chromium, Quicktime seems | 174 // While we support the big endian (be) PCM codecs on Chromium, Quicktime seems |
| 187 // to be the only creator of this format and only for .mov files. | 175 // to be the only creator of this format and only for .mov files. |
| 188 // TODO(dalecurtis/ihf): Find or create some .wav test cases for "be" format. | 176 // TODO(dalecurtis/ihf): Find or create some .wav test cases for "be" format. |
| 189 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMovPcmS16be) { | 177 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMovPcmS16be) { |
| 190 PlayVideo("bear_pcm_s16be.mov", GetParam()); | 178 PlayVideo("bear_pcm_s16be.mov", GetParam()); |
| 191 } | 179 } |
| 192 | 180 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { | 263 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { |
| 276 PlayVideo("bear.webm", false); | 264 PlayVideo("bear.webm", false); |
| 277 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); | 265 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); |
| 278 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); | 266 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
| 279 } | 267 } |
| 280 | 268 |
| 281 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); | 269 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); |
| 282 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); | 270 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); |
| 283 | 271 |
| 284 } // namespace content | 272 } // namespace content |
| OLD | NEW |