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

Unified Diff: tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html

Issue 2223123002: Add fullscreen video power test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues. Created 4 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
« no previous file with comments | « tools/perf/page_sets/trivial_sites/road_trip_640_480.mp4.sha1 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html
diff --git a/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html b/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html
new file mode 100644
index 0000000000000000000000000000000000000000..4b32ddecf3659e3954abcd03171cfb508da457fa
--- /dev/null
+++ b/tools/perf/page_sets/trivial_sites/trivial_fullscreen_video.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html>
+<head>
+ <style type="text/css">
+ /* Make the video stretch to fill the screen. */
+ :-webkit-full-screen #fullscreenvideo {
+ width: 100%;
+ height: 100%;
+ }
+ </style>
+</head>
+<body>
+ <!--This video was obtained from
+ https://videos.pexels.com/videos/adventure-trip-481. It is licensed under
+ Creative Commons Zero, which does not require attribution.-->
+ <video controls src="road_trip_640_480.mp4" width="640"
+ height="480" id="fullscreenvideo" autoplay="autoplay">
+</body>
+<script>
+ var videoElement = document.getElementById("fullscreenvideo");
+
+ function toggleFullScreen() {
+ if (!document.webkitFullScreen) {
+ videoElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
+ } else {
+ document.webkitCancelFullScreen();
+ }
+ }
+
+ // Pressing "Return" causes the video to enter fullscreen.
+ document.addEventListener("keydown", function(e) {
+ if (e.keyCode == 13) {
+ toggleFullScreen();
+ }
+ }, false);
+</script>
+</html>
« no previous file with comments | « tools/perf/page_sets/trivial_sites/road_trip_640_480.mp4.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698