Chromium Code Reviews| OLD | NEW |
|---|---|
| (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> | |
| OLD | NEW |