Chromium Code Reviews| Index: content/browser/media/media_browsertest.cc |
| diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc |
| index 0ca34d11cb899073242e534eb9a5d19f7daecea7..7c4d361b788b8290f7e94cbfef7ab94ff386febe 100644 |
| --- a/content/browser/media/media_browsertest.cc |
| +++ b/content/browser/media/media_browsertest.cc |
| @@ -4,6 +4,7 @@ |
| #include "content/browser/media/media_browsertest.h" |
| +#include "base/strings/string_number_conversions.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/test/browser_test_utils.h" |
| @@ -54,6 +55,7 @@ std::string MediaBrowserTest::RunTest(const GURL& gurl, |
| TitleWatcher title_watcher(shell()->web_contents(), |
| base::ASCIIToUTF16(expected_title)); |
| AddWaitForTitles(&title_watcher); |
| + title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16(expected_title)); |
| NavigateToURL(shell(), gurl); |
| base::string16 result = title_watcher.WaitAndGetTitle(); |
| return base::UTF16ToASCII(result); |
| @@ -97,6 +99,17 @@ class MediaTest : public testing::WithParamInterface<bool>, |
| query_params.push_back(std::make_pair(tag, media_file)); |
| RunMediaTestPage("player.html", query_params, kEnded, http); |
| } |
| + |
| + void RunVideoSizeTest(const char* media_file, bool http, |
| + int width, int height) { |
| + std::string expected; |
| + expected += base::IntToString(width); |
| + expected += " "; |
| + expected += base::IntToString(height); |
| + media::QueryParams query_params; |
| + query_params.push_back(std::make_pair("video", media_file)); |
| + RunMediaTestPage("player.html", query_params, expected, http); |
| + } |
| }; |
| IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) { |
| @@ -142,6 +155,22 @@ IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMovPcmS16be) { |
| IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearMovPcmS24be) { |
| PlayVideo("bear_pcm_s24be.mov", GetParam()); |
| } |
| + |
| +IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearRotated0) { |
|
scherkus (not reviewing)
2014/08/07 00:38:48
these should be _P -> _F and remove the GetParam()
suderman
2014/08/07 00:49:36
Done.
|
| + RunVideoSizeTest("bear_rotate_0.mp4", GetParam(), 1280, 720); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearRotated90) { |
| + RunVideoSizeTest("bear_rotate_90.mp4", GetParam(), 720, 1280); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearRotated180) { |
| + RunVideoSizeTest("bear_rotate_180.mp4", GetParam(), 1280, 720); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearRotated270) { |
| + RunVideoSizeTest("bear_rotate_270.mp4", GetParam(), 720, 1280); |
| +} |
| #endif // defined(USE_PROPRIETARY_CODECS) |
| #if defined(OS_CHROMEOS) |