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

Unified Diff: LayoutTests/media/video-frame-size-change.html

Issue 103913010: Add new "resize" event to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: vsevik & acolwell CR Created 7 years 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: LayoutTests/media/video-frame-size-change.html
diff --git a/LayoutTests/media/video-frame-size-change.html b/LayoutTests/media/video-frame-size-change.html
index 653309e1e71a08147f68a34a0213724ad9cb8284..8d844e92bccd70f901f1a007d2333037226cbbf6 100644
--- a/LayoutTests/media/video-frame-size-change.html
+++ b/LayoutTests/media/video-frame-size-change.html
@@ -11,14 +11,29 @@
testRunner.waitUntilDone();
}
- function load() {
+ function load()
+ {
var video = document.getElementsByTagName("video")[1];
var video_fixed_size = document.getElementsByTagName("video")[0];
video.src = "resources/frame_size_change.webm";
video_fixed_size.src = "resources/frame_size_change.webm";
+ // Expect no resize event because the tag's size (the frames'
+ // "natural size") doesn't change, only the internal resolution
+ // does. Fail if this expectation is violated.
+ video.addEventListener('resize', onresize);
+ video_fixed_size.addEventListener('resize', onresize);
+ function onresize()
+ {
+ document.body.appendChild(document.createTextNode('FAIL: unexpected resize'));
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+ }
+
var canplayCount = 0;
- function oncanplay() {
+ function oncanplay()
+ {
if (++canplayCount < 2) {
return;
}
@@ -37,7 +52,8 @@
video_fixed_size.addEventListener('canplay', oncanplay);
var playingCount = 0;
- function onplaying() {
+ function onplaying()
+ {
if (++playingCount < 2) {
return;
}
@@ -46,7 +62,8 @@
video_fixed_size.removeEventListener('playing', onplaying);
// Make sure both videos play for a bit.
- function ontimeupdate(e) {
+ function ontimeupdate(e)
+ {
if (e.target.currentTime > 1.0) {
e.target.pause();
}
@@ -58,13 +75,15 @@
video_fixed_size.addEventListener('playing', onplaying);
var pauseCount = 0;
- function onpause() {
+ function onpause()
+ {
if (++pauseCount < 2) {
return;
}
var seekedCount = 0;
- function onseeked() {
+ function onseeked()
+ {
if (++seekedCount < 2) {
return;
}
« no previous file with comments | « LayoutTests/http/tests/media/media-source/mediasource-config-changes.js ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698