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

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: Addressed Mounir's comments Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test that calling prompt() before the promise returned by the pre vious call is resolved throws an exception</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script>
8 </head>
9 <body>
10 <script>
11 async_test(function(test)
12 {
13 var v = document.createElement('video');
14 v.src = findMediaFile('video', 'content/test');
15 document.body.appendChild(v);
16
17 document.onclick = function() {
18 v.remote.prompt();
19
20 v.remote.prompt().then(
mlamouri (slow - plz ping) 2016/10/01 14:55:53 Maybe you should have another simulated user gestu
whywhat 2016/10/03 20:39:01 Hm, if the checks are reversed, the utiliseUserGes
21 test.unreached_func(),
22 test.step_func_done(function(e) {
23 assert_equals(e.name, 'OperationError');
24 assert_equals(e.message, 'A prompt is already being shown for this media element.');
25 }));
26 document.onclick = null;
27 }
28
29 eventSender.mouseDown();
30 eventSender.mouseUp();
mlamouri (slow - plz ping) 2016/10/01 14:55:53 Having a <button>click me</button> as a target wou
whywhat 2016/10/03 20:39:01 Alright. I'll try to remember to point noone to th
31 }, 'Test that calling prompt() before the promise returned by the pr evious call is resolved throws an exception.');
32 </script>
33 </body>
34 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698