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

Unified Diff: third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media.html

Issue 2334803002: Implementation of media controls download button. (Closed)
Patch Set: fixed tests Created 4 years, 3 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 | « no previous file | third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media.html b/third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media.html
new file mode 100644
index 0000000000000000000000000000000000000000..4857ae80908a887070d07522dc86c27a1ddb3930
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Clicking on the download button should download media.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-controls.js"></script>
+<script src="media-file.js"></script>
+<script src="overflow-menu.js"></script>
+<!--Padding ensures the overflow menu is visible for the tests. -->
+<body style="padding-top: 200px; padding-left: 100px">
+<video controls></video>
+<script>
+if (window.testRunner) {
+ // Ensures that a file is downloaded and the printed output of the test
+ // is the same as video-controls-download-button-saves-media-expected.txt
+ testRunner.waitUntilExternalURLLoad();
+}
+async_test(function(t) {
+ if (window.internals)
+ window.internals.runtimeFlags.mediaControlsDownloadButtonEnabled = true;
+ // Set up video
+ var video = document.querySelector("video");
+ video.src = findMediaFile("video", "content/test");
+ var controlID = "-internal-download-button";
+ var downloadButton = mediaControlsElement(internals.shadowRoot(video).firstChild, controlID);
+
+ video.onloadeddata = t.step_func(function() {
+ // Click on the download button
+ var coords = elementCoordinates(downloadButton);
+ clickAtCoordinates(coords[0], coords[1]);
+ });
+});
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-controls-download-button-saves-media-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698