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

Side by Side Diff: third_party/WebKit/LayoutTests/media/autoplay/autoplay-document-move.html

Issue 2047433003: Update autoplay settings when moving media elements between documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments, added layout tests Created 4 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Moving media element to other document to bypass autoplay</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../media-file.js"></script>
6 <body>
7 <script>
8 console.warn("dummy log entry to avoid an empty -expected.txt in virtual/");
9
10 test(function() {
mlamouri (slow - plz ping) 2016/06/07 19:59:01 You should use a async_test here.
Zhiqiang Zhang (Slow) 2016/06/08 16:11:56 Done.
11 var v = document.implementation.createHTMLDocument().createElement('video');
12 v.src = findMediaFile('video', '../content/test');
13 document.body.appendChild(v);
14 assert_true(document.querySelector('video') != null, 'video was not moved to document');
15 assert_true(v.paused, 'video should be paused in initial state');
16 v.play().then(
mlamouri (slow - plz ping) 2016/06/07 19:59:01 You will have to use t.test_func_done() to wrap th
Zhiqiang Zhang (Slow) 2016/06/08 16:11:56 Done.
17 function(e) {
18 console.warn("video starts playing");
19 },
20 function(e) {
21 console.warn("caught expected exception");
mlamouri (slow - plz ping) 2016/06/07 19:59:02 I think it's wrong to do console.warn() on testhar
Zhiqiang Zhang (Slow) 2016/06/08 16:11:56 Done.
22 });
23 }, 'Test that video should not play without user gesture after moving to anoth er document');
24 </script>
25 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698