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

Unified Diff: chrome/test/data/media/youtube.html

Issue 9666032: Cleanup deprecated PyAuto media tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « chrome/test/data/media/swfobject.js ('k') | chrome/test/functional/media/media_fps.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/media/youtube.html
diff --git a/chrome/test/data/media/youtube.html b/chrome/test/data/media/youtube.html
deleted file mode 100644
index 2754be5668fb7ecae3996f5ec8033640681bbe7a..0000000000000000000000000000000000000000
--- a/chrome/test/data/media/youtube.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!-- This is a test html file for Youtube video tests -->
-<html>
-
-<script type="text/javascript" src="swfobject.js"></script>
-<script type="text/javascript">
-
-// Most of this was borrowed from:
-// http://code.google.com/apis/ajax/playground/?exp=youtube#polling_the_player
-
-// Update a particular HTML element with a new value
-function updateHTML(elmId, value) {
- document.getElementById(elmId).innerHTML = value;
-}
-
-// This function is called when the player changes state
-function onPlayerStateChange(newState) {
- updateHTML("playerState", newState);
-}
-
-// Display information about the current state of the player
-function updatePlayerInfo() {
- if(ytplayer && ytplayer.getDuration) {
- updateHTML("bytesTotal", ytplayer.getVideoBytesTotal());
- updateHTML("startBytes", ytplayer.getVideoStartBytes());
- updateHTML("bytesLoaded", ytplayer.getVideoBytesLoaded());
- updateHTML("duration", ytplayer.getDuration());
- updateHTML("videoCurrentTime", ytplayer.getCurrentTime());
- }
-}
-
-function onYouTubePlayerReady(playerId) {
- ytplayer = document.getElementById("myytplayer");
- console.log("player ready to play");
- setInterval(updatePlayerInfo, 1000);
- updatePlayerInfo();
- // Possible player statuses:
- // unstarted (-1), ended (0), playing (1), paused (2), buffering (3),
- // video cued (5).
- updateHTML("playerState", ytplayer.getPlayerState());
- ytplayer.addEventListener("onStateChange", "onPlayerStateChange");
- ytplayer.addEventListener("onError", "onPlayerError");
-}
-
-function loadPlayer() {
- var params = { allowScriptAccess: "always" };
- var atts = { id: "myytplayer" };
- var video_id = window.location.href.split("video=");
- swfobject.embedSWF(
- "http://www.youtube.com/e/" + video_id[1] +
- "?version=3&enablejsapi=1&playerapiid=ytplayer",
- "ytapiplayer", "800", "600", "8", null, null, params, atts);
-}
-
-</script>
-
-<div id="ytapiplayer">
- You need Flash player 8+ and JavaScript enabled to view this video.
-</div>
-<body onload="loadPlayer()">
-<br>
-Player State (playerState): <span id=playerState>0</span> Possible player
-statuses: unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
-<br>
-Total Bytes (bytesTotal): <span id=bytesTotal>0</span>
-<br>
-Start Bytes (startBytes): <span id=startBytes>0</span>
-<br>
-Bytes Loaded (bytesLoaded): <span id=bytesLoaded>1</span>
-<br>
-Duration (duration): <span id=duration>0</span>
-<br>
-Current Time (videoCurrentTime): <span id=videoCurrentTime>0</span>
-
-</html>
« no previous file with comments | « chrome/test/data/media/swfobject.js ('k') | chrome/test/functional/media/media_fps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698