-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use our own testsite in firefox html5 test
- Loading branch information
Showing
10 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for i in {1..1000} ; do ln -s /tmp/PM5544_with_non-PAL_signals.png $(printf f-%03d.png $i) ; done | ||
ffmpeg -framerate 10 -i f-%03d.png -pix_fmt yuv420p video.webm | ||
ffmpeg -framerate 10 -i f-%03d.png -pix_fmt yuv420p video.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<video controls autoplay muted> | ||
<source src="video.webm" type="video/webm"> | ||
<source src="video.mp4" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
<div style="background: blue; color: yellow; font-family: sans-serif; font-size: 20px;">Video not started yet</div> | ||
|
||
<script> | ||
let video = document.getElementsByTagName('video')[0]; | ||
let div = document.getElementsByTagName('div')[0]; | ||
video.addEventListener('timeupdate', e => { | ||
div.innerHTML = "Pos: " + Math.round(e.target.currentTime) + " seconds" + "<br>Source: " + video.currentSrc; | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,34 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2009-2013 Bernhard M. Wiedemann | ||
# Copyright 2012-2021 SUSE LLC | ||
# Copyright 2012-2022 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Package: MozillaFirefox | ||
# Summary: Case#1479221: Firefox: HTML5 Video | ||
# - Launch xterm, kill firefox, cleanup previous firefox configuration, launch | ||
# firefox | ||
# - Open "youtube.com/html5" and check result | ||
# - Open "youtube.com/watch?v=Z4j5rJQMdOU" and check result | ||
# - open test html5 video page | ||
# - Exit firefox | ||
# Maintainer: wnereiz <wnereiz@gmail.com> | ||
|
||
use strict; | ||
use warnings; | ||
use base "x11test"; | ||
use testapi; | ||
use utils; | ||
|
||
sub run { | ||
my ($self) = @_; | ||
$self->start_firefox_with_profile; | ||
|
||
$self->firefox_open_url('youtube.com/watch?v=Z4j5rJQMdOU'); | ||
while (check_screen([qw(firefox-youtube-signin firefox-accept-youtube-cookies)], 15)) { | ||
if (match_has_tag('firefox-accept-youtube-cookies')) { | ||
# get to the accept button with tab and space | ||
wait_still_screen(2); | ||
send_key_until_needlematch('firefox-accept-youtube-cookies-agree', 'tab', 7, 1); | ||
assert_and_click('firefox-accept-youtube-cookies-agree'); | ||
wait_still_screen(2); | ||
next; | ||
} | ||
elsif (match_has_tag('firefox-youtube-signin')) { | ||
assert_and_click('firefox-youtube-signin'); | ||
wait_still_screen(2); | ||
next; | ||
} | ||
last; | ||
} | ||
send_key_until_needlematch('firefox-testvideo', 'spc', 30, 5); | ||
x11_start_program('xterm'); | ||
script_run('cd ~/data/testwebsites'); | ||
enter_cmd('python3 -m http.server 48080 &'); | ||
assert_script_run 'curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 40 http://localhost:48080/'; | ||
$self->firefox_open_url('http://localhost:48080/html5_video'); | ||
assert_screen('firefox-testvideo'); | ||
$self->exit_firefox; | ||
enter_cmd('exit'); | ||
} | ||
1; |