chromium/third_party/blink/web_tests/http/tests/media/video-controls-download-button-saves-media-cross-origin.html

<!DOCTYPE html>
<title>Clicking on the download button should download cross-origin media.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../../media-resources/media-controls.js"></script>
<script src="../../media-resources/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) {
  // Set up video
  var video = document.querySelector("video");
  video.src = "http://localhost:8000/media/resources/test.ogv";
  enableTestMode(video);

  video.onloadeddata = t.step_func(function() {
    // Click on the download button
    clickDownloadButton(video);
  });
});
</script>
</body>