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

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: Fixed the test 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 <button id="button">Click me</button>
11 <script>
12 function clickOnElem(e) {
13 eventSender.mouseMoveTo(
14 e.offsetLeft + e.offsetWidth / 2,
15 e.offsetTop + e.offsetHeight / 2);
16 eventSender.mouseDown();
17 eventSender.mouseUp();
18 }
19
20 async_test(function(test)
21 {
22 var v = document.createElement('video');
23 v.src = findMediaFile('video', 'content/test');
24 document.body.appendChild(v);
25
26 var btn = document.getElementById('button');
27 btn.onclick = function() {
28 v.remote.prompt();
29
30 btn.onclick = function() {
31 v.remote.prompt().then(
32 test.unreached_func(),
33 test.step_func_done(function(e) {
34 assert_equals(e.name, 'OperationError');
35 assert_equals(e.message, 'A prompt is already be ing shown for this media element.');
36 }));
37 btn.onclick = null;
38 };
39 clickOnElem(btn);
40 }
41
42 clickOnElem(btn);
43 }, 'Test that calling prompt() before the promise returned by the pr evious call is resolved throws an exception.');
44 </script>
45 </body>
mlamouri (slow - plz ping) 2016/10/04 10:48:47 This file is over-indented. LayoutTests are usuall
46 </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