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

Unified Diff: content/browser/media/media_browsertest.cc

Issue 388643002: Rotation into Video Layer + Content Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android webmediaplayer Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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..0ffc029d80e1030f4def70163c0da87eeed79aee 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"
@@ -97,6 +98,16 @@ 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, 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, false);
+ }
};
IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) {
@@ -142,6 +153,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_F(MediaTest, VideoBearRotated0) {
+ RunVideoSizeTest("bear_rotate_0.mp4", 1280, 720);
+}
+
+IN_PROC_BROWSER_TEST_F(MediaTest, VideoBearRotated90) {
+ RunVideoSizeTest("bear_rotate_90.mp4", 720, 1280);
+}
+
+IN_PROC_BROWSER_TEST_F(MediaTest, VideoBearRotated180) {
+ RunVideoSizeTest("bear_rotate_180.mp4", 1280, 720);
+}
+
+IN_PROC_BROWSER_TEST_F(MediaTest, VideoBearRotated270) {
+ RunVideoSizeTest("bear_rotate_270.mp4", 720, 1280);
+}
#endif // defined(USE_PROPRIETARY_CODECS)
#if defined(OS_CHROMEOS)
« no previous file with comments | « cc/trees/layer_tree_host_unittest_video.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698