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

Side by Side Diff: third_party/WebKit/LayoutTests/media/remoteplayback/prompt-twice-throws.html

Issue 2347763002: [Blink, RemotePlayback] Reject the prompt() with OperationError if there's a pending promise for th… (Closed)
Patch Set: Added UserGesture flag for tests, removed some checks in HTMLMediaElement, added layout test 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test that calling prompt() when disableRemotePlayback attribute i s set throws an exception</title> 4 <title>Test that calling prompt() when disableRemotePlayback attribute i s set throws an exception</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script> 7 <script src="../media-file.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <script> 10 <script>
11 promise_test(function(test) 11 promise_test(function(test)
12 { 12 {
13 internals.settings.setRemotePlaybackRequiresUserGesture(false);
mlamouri (slow - plz ping) 2016/09/22 09:22:43 nstead, I think you can wrap this with a method th
whywhat 2016/09/30 19:11:33 Done. I anticipate the flag to be needed by integr
13 var v = document.createElement('video'); 14 var v = document.createElement('video');
14 v.src = findMediaFile('video', 'content/test'); 15 v.src = findMediaFile('video', 'content/test');
15 v.disableRemotePlayback = true
16 document.body.appendChild(v); 16 document.body.appendChild(v);
17 17
18 v.remote.prompt();
19
18 return promise_rejects( 20 return promise_rejects(
19 test, 21 test,
20 new DOMException('disableRemotePlayback attribute is present .', 'InvalidStateError'), 22 new DOMException('A prompt is already being shown for this m edia element.', 'OperationError'),
21 v.remote.prompt()); 23 v.remote.prompt());
22 }, 'Test that calling prompt() when disableRemotePlayback attribute is set throws an exception.'); 24 }, 'Test that calling prompt() when disableRemotePlayback attribute is set throws an exception.');
23 </script> 25 </script>
24 </body> 26 </body>
25 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Settings.in » ('j') | third_party/WebKit/Source/core/frame/Settings.in » ('J')

Powered by Google App Engine
This is Rietveld 408576698